Mautic Community Forums

No tracker set on form submission

Here is the situation.



I have a form on a website where clients are entering an access code provided to them by regular mail. At that point, information is extracted from our DB and the client is redirected to a confirmation page. On the confirmation page, a javascript AJAX post call is done to ‘http://(mymautic path)/form/submit’ with the information extracted from the DB to generate a complete contact in Mautic will all the necessary information for the marketing automation communications.



Everything works perfectly that way. Which means that an anonymous page hit is first recorded, then a form submission (contact identification) and all the rest of the session navigation is correctly recorded by Mautic. The Javascript Tracker is set on all pages including the confirmation page.



A problem occurs when a user arrives at that same website from an SMS or an Email (that were not sent from mautic) with the access code as a GET parameter. In that way, the website extracts the data from the DB and redirect the client to the confirmation page without ever getting to the landing page where the form is (not generated by Mautic).



At that point this is what is WORKING: the form is submitted to Mautic by AJAX Post call to ‘http://(mymautic path)/form/submit’ like before and the information is perfectly recorded in Mautic. This is what is NOT WORKING: the page hit to the confirmation page is not recorded AND no tracker are set by Mautic which means that the rest of the session navigation is not associated with the contact created by the form but to an anonymous contact. It seems like the call to ‘http://(mymautic path)/form/submit’ is not setting any cookies if those are not set.



Is there something I am doing wrong. Is there another way to do this?



Thanks.

Here is the situation.

I have a form on a website where clients are entering an access code provided to them by regular mail. At that point, information is extracted from our DB and the client is redirected to a confirmation page. On the confirmation page, a javascript AJAX post call is done to ‘http://(mymautic path)/form/submit’ with the information extracted from the DB to generate a complete contact in Mautic will all the necessary information for the marketing automation communications.

Everything works perfectly that way. Which means that an anonymous page hit is first recorded, then a form submission (contact identification) and all the rest of the session navigation is correctly recorded by Mautic. The Javascript Tracker is set on all pages including the confirmation page.

A problem occurs when a user arrives at that same website from an SMS or an Email (that were not sent from mautic) with the access code as a GET parameter. In that way, the website extracts the data from the DB and redirect the client to the confirmation page without ever getting to the landing page where the form is (not generated by Mautic).

At that point this is what is WORKING: the form is submitted to Mautic by AJAX Post call to ‘http://(mymautic path)/form/submit’ like before and the information is perfectly recorded in Mautic. This is what is NOT WORKING: the page hit to the confirmation page is not recorded AND no tracker are set by Mautic which means that the rest of the session navigation is not associated with the contact created by the form but to an anonymous contact. It seems like the call to ‘http://(mymautic path)/form/submit’ is not setting any cookies if those are not set.

Is there something I am doing wrong. Is there another way to do this?

Thanks.

I found a patchy solution.
I added the customer email address to the mt(‘send’,‘pageview’,{email: }) that is occurring at the same time as the AJAX form submit.

In fact, the pageview events where associated to an anonymous contact.