Your software
My Mautic version is: 3.2.5 and 3.3.2
My PHP version is: 7.3.27
Your problem
When a visitor visits multiple pages of my website, Mautic creates multiple anonym contacts for him. Even after identifying him via Email, Mautic still creates multiple new anonym contacts for every page he visits.
I tested on multiple browsers. The issue is in Opera and Safari, but not in Firefox, Chrome, Microsoft Edge, Internet Explorer and Firefox Android
Steps I have tried to fix the problem:
I tested multiple browsers, turned âAnonymize IPâ on and off, subscribed via my forms, etc. Tested for 5+ hours.
Please help me, because at the moment Mautic is useless this way - many new subscriber are unable to complete the double-optin process, so I lose many new leads.
Iâm just asking, because it is really hard to test. And you rely on your own test, so if you do it wrong, you might think there is something wrong with Mautic. I would like to give you some tips:
Known/Unknown visitors are tracked by cookies. Cookies only have reliable access if they are first party cookies, which means your Mautic install domain should be a subdomain of the website youâd like to track. Otherwise itâs handled as third party cookie and the browsers will punish you for that, especially Safari.
Once you login as admin, you get an admin designation, that is saved. It means, that certain functions will work differently for you. You wonât be tracked for example. Or see dynamic content nor focus items. This also shows problems with understanding what doesnât work.
If you check Mautic with privacy mode, then no cookies will be used, so you might be tracked as a new person every time you check the website.
Also make sure you use https in all cases.
I have to mention, that browser based tracking works really well. However there are issues with API + Browser tracking combination, but that is not what you subscribed.
I checked now in Mautic 7-8 real subscribers and plenty of them had this issue, that every page-view created a new visitor in Mautic for them. The big problem with this is, that even if they confirm their email-address (double-optin), this doesnât get recognized - so they stay unconfirmed and I canât send them new emails.
I always have âIdentify visitor by tracking urlâ on âYesâ, so cookies canât be the (only?) problem. Because when somebody submits my optin-form and clicks on the link which he gets via email, the visitor-ID should be in the tracking-url, shouldnât it?
Plus, for testing-purposes, I turned on âIdentify visitors by IPâ (normally I donât track IPâs), and even so this issue exists.
Sure, I do just use HTTPS
I think I donât use the API, just normal Javascript
There were 2 problems:
1.) Some browsers (like Safari) forbid cross-site tracking regarding cookies
2.) The " Identify visitor by tracking url " feature of Mautic doesnât seem to work correctly
How I solved it:
âŚBy telling Mautic which email-address that ânew visitorâ is. For this, 2 things are needed:
The link " Click here to confirm your email-address " in the email " Please confirm your email-address " must contain the email-token (so the link will be like website.com/confirmed?email=example@example.com )
Mauticâs Javascript-tracking-code must contain this: mt('send', 'pageview'<?php if ($_GET["email"]) { echo ", { , 'email': '" . $_GET["email"] . "'}"; } ?> );
âŚinstead of just this: mt('send', 'pageview');
So the script gets the Email-Address from the URL and helps so Mautic to correctly identify the visitor.
Thank you very much joeyk - your question regarding third-party-tracking helped me to solve this!
Hey, you are welcome, you solved it yourself. Good job and thx for posting the solution.
I would like to mention, that you can serve first party cookies the following way (I had a tutorial about this in the forum, but canât find it now.)
Lets say you want to track:
domain1
domain2
domain3