Multiple anonym contacts for same visitor (even after identifying him)

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.

Could you reproduce it yourself?
How did you deal with the cookie?
Did you use secret mode?

I have these information based on my own tests. So yes.

Not sure what you mean, I didn’t do anything with the cookies. And in all browsers cookies were activated.

You mean if I tried private mode in browsers? Yes, I tried that too, same issue.

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 hope this helps.


  • 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

  1. You can track clicks instead of page visits when they confirm. Clicks are not tracked using cookies.
  2. You didn’t answer about first/third party tracking.
  3. Do you use any firewall?

After 4 days of testing, I solved it.

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 )
  • 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! :slight_smile:

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:

  1. Install Mautic on “
  2. Set CNAME t.domain2
  3. Set CNAME t.domain3

This way points at

Now add the following tracking to DOMAIN2 (and also to DOMAIN3)

mt('send', 'pageview');

Voilá, you are serving first party cookies :slight_smile:

1 Like