# Merge anonymous contacts on email link

**URL:** <https://forum.mautic.org/t/merge-anonymous-contacts-on-email-link/24714>\
**Category:** Product Support\
**Created:** [July 7, 2022, 5:31pm UTC](https://forum.mautic.org/t/merge-anonymous-contacts-on-email-link/24714 "2022-07-07T17:31:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mautic\_test](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mautic_test/32/6285_2.png) [@mautic\_test](https://forum.mautic.org/u/mautic_test)\
**Post date:** [July 7, 2022, 5:31pm UTC](https://forum.mautic.org/t/merge-anonymous-contacts-on-email-link/24714/1 "2022-07-07T17:31:34Z")

</div>

**Your software**  
My Mautic version is: 4.3.1  
My PHP version is: 7.4.29  
My Database type and version is: 10.5.10-MariaDB

I have created a number of contacts with emails through the API. I also have anonymous users showing up from page hits on my website. I expect that when I send an email to a known user for the first time and they click on an email link it will merge their existing anonymous user’s history into the known contact.

As of right now when the user clicks an email link the anonymous user and its history is abandoned, with new events being tracked on the known user.

Is this a configuration issue or is this behavior not supported by Mautic?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 7, 2022, 7:59pm UTC](https://forum.mautic.org/t/merge-anonymous-contacts-on-email-link/24714/2 "2022-07-07T19:59:20Z")

</div>

Hello!  
Mautic merges data with the known user first and if it’s not available, then with anonymous user.  
If you create a user with an API, then it’s a known user. Anonymous visits will not be merged.

Here is a thread discussing exactly this:

> [@Tracking Code & Shopify Not Matching up to Contacts](https://forum.mautic.org/t/tracking-code-shopify-not-matching-up-to-contacts/16465/4):
>
> @mikew , I just ran into this myself. Funny to read my answer and getting angry at myself. In fact, my suggestion doesn’t work. This is the issue I ran into (running 3.2.1 on this one) 1. User checks shopify page with Mautic tracking tracking works perfectly, anonimous user is created, and tracked properly. 2. User chooses products, goes to the cart tracking still works, contact is seen last in the cart. 3. User pays tracking doesn’t register that, but it’s okay, shopify keeps its sys…
