Mautic overrides the existing contact

  1. 6 months ago
    Edited 6 months ago by Sivananda Perumal

    Hi,

    Thanks for this wonderful automation tool. I'm new to mautic. I have 3 websites and I just want to track all the site users in my mautic.

    So, I have put the trackingJS code into my 3 sites. Whenever the user is logged in I want to track those events in the mautic.

    My tracking JS code is:
    (function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
    w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
    m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://mydomain.com/mtc.js','mt');

    Whenever the user is logged in this code will trigger
    mt('send', 'pageview', {email:loggedInEmail, firstname:loggedInName});

    Then I did this, I logged into my site with email abc@gmail.com and logged out then again I logged with xyz@gmail.com on the same browser.

    What happens is when abc@gmail.com is logged in new user is created in the mautic. And abc@gmail.com is logged out, then the login of xyz@gmail.com is overriding the data of abc@gmail.com in mautic.

    Why is that so happening? I think this is happening due to the mautic cookie data on the site.

    Using

    Mautic -> 2.81v
    Php -> 5.6
    Step to reproduce:

    Add the trackingJS Code on the website.
    Try to send the logged in user details to mautic.
    it will override the first logged in user when you attempt to login with other emails.
    Awaiting for your response !!!!!

  2. It's natural behavior.
    If you don't have experience with Mautic, use 3 differents instalallation for every website.
    Or try find solutions (merge contacts with API, clear cookie/local storage after logout etc).

  3. 5 months ago

    @kuzmany I think we can't able to clear the mautic cookies from our website.

  4. 2 months ago

    I am having the same problem.

    Is it possible to be solved without changing Mautic's code?

 

or Sign Up to reply!