Cookies issue

Hello @joeyk,
I am explaining what is happing. I have a web app there. I have put mautic script to generate contacts.
So if i am signing up there Eg:- first_name, last_name, email Than what happing is Contact is creating on my dashboard but suppose i have logged out my-self from than webapp and next time when i am doing signup. than new contact is not creating it is getting merged in previous one. So is there any solution for this. So that every time same user will signup I want that should come as new contact created.
And its not a form. It just a other website where i have kept mautic script to generate contacts.

Note:- Thank you for you response
please help me on this.


If YOU are signing up with your browser, YOU will be tracked and all your signups will be merged as one. But that is how it supposed to be :slight_smile:

If a real contact signs up from their OWN browser and OWN instance, they will be tracked and not merged with you.

If you want to turn off the cookie tracking for that specific form, than use kiosk mode. In this case no other contacts will be merged.

Hello @joeyk,
If YOU are signing up with your browser, YOU will be tracked and all your signups will be merged as one. But that is how it supposed to be.
This I got.
But what happen is even though i am filling different data. Eg:- suppose my first signup data is Amit, kumar, And after logout if i am signing up again with different data like:- Sumit, kumar, Than in this case it should not be merged right, But What happen is in this case also both data is getting merged.

Thank you for your previous reply.
please help me on this.

And after logout if i am signing up again

Logout from where?
Aren’t you filling out a mautic form, that is placed on a page?

Hello @joeyk,
logout from my webapp. Yes I am not filling mautic form. i am filling a form on a website which is given by that website. But what i have done is. I have kept similer mt() function with more fields.
mt(‘send’, ‘pageview’, {email: ‘’, firstname: ‘John’});


Okay, so when you pass the pageview, than you pass the name and email.
That is EXACTLY what happens:
You tell Mautic: Hello Mautic, with this email and name and ip there is a new contact, or if there is one, please merge.
Only record the Pageview if the contact is browsing the page who the name and email belongs to.

I’m not sure, that I can help you, but you should check the tracking settings in the Settings page (Cogwheel on the right). There you can tweak Mautic tracking and make sure you are merging what you want to merge.

For me it looks like the changes in the tracking cookie have this sideeffect you mentioned.
I’d suggest to use API for a tracking where pageview tracking is not needed.

by api, you mean tracking pixel or just the api?
because i am facing the same issue and it merges the contacts
Link to a similar question
what I. want is that I have a normal website where i login and logout and it’s made in javascript.
so what i do is everytime someone signs up, i use this function call

mt(“send”, “pageview”, {…properties})

and it saves a cookie by the name mtc_id and mautic_device_id.
so, suppose i want to logout and sign in from some other id, it will pick the previous cookie and update the previous contact.
so, i want to delete the cookie from my javascript website, but i am unable to do that because that cookie is set by my server say “”
so, is there any functionn that removes that cookie? which come from my server.


You can delete cookies in your browser.
For firefox, follow this:

please reply @joeyk .
i am stuck at a problem

Hi, Sorry xmas is busy :slight_smile:
I’m not sure what you are trying to achieve. Mautic is tracking your contacts by placing cookie on their computer. Not on your computer.
If you don’t want to track the form submission locations, you need to turn on Kiosk-Mode at the forms.
Does that help?

BTW, I noticed, that is a Mautic Provider. I think they can answer your question better, as they know their own environment.

its ok and merry Christmas
thanks a lot for your reply @joeyk
i am using javascript script for tracking.
Now suppose I want to track another user on the same browser.
what i am currently doing is sending params with the script like email.
so now suppose a user comes on my website and logs in, I start tracking their page activity using the script. and that page activity is linked to the email of the user.
now suppose that user logs out and another user signs in.
now when the script is called, with email, it updates the previous email merging the 2 contacts.
I don’t want that.
I want that when a user logs out, all the cookies gets deleted.
so that when new user logs in with new email and the script is run with new email, it makes a new contact instead of merging with the older one (with same cookie)

Hi @namratasaun

Did you solve it? I think I found a solution but it required editing a Mautic PHP file.

  1. You have to have Mautic hosted in a subdomain of your application domain. (Ex.

  2. You have to edit the file app/bundles/LeadBundle/Tracker/Service/ContactTrackingService/ContactTrackingService.php and search for setCookie() lines. For each line, change the setCookie( call to add a domain parameter. setcookie(name,value,expires,null,""). That elevates the Mautic cookies to the parent domain and lets them accessible both to your Mautic instance as the app instance.

  3. Now you can use javascript in your app to clean the mautic cookies when the user logs out. The cookies you have to delete are: mtc_id, mtc_sid, mautic_device_id, mautic_session_id and a cookie named as the value of mtc_sid.

I have started testing this solution now in a production environment so I can’t ensure that is a correct and valid solution. But I think it will be.

I hope this helps you.

Remember you are editing a core PHP file at your own risk… :grimacing::grimacing::grimacing:

Ah!!! And one more thing:

You also have to delete the same in localStorage. Ex localStorage.deleteItem(“mtc_id”)

Hi @vicampuzano

Thanks for sharing your solution.
But is there any other way for achieving this without editing the mautic code.
Like can we do it with clearing the mautic cookies or local storage data from client browser programmatically ?
I tried that but not didn’t make it work.
Any thoughts on this approach ?

it won’t be possible to achieve it through client browser as the cookie is set by out mautic instance. So not possible to delete using client side javascript. I tried. It was deleteing other cookies, but not the ones set by mautic (where source is your mautic domain)

1 Like

oh my god!
Thank a lot for your help. will try this and update you. But this seems it will work.
Thanks a lot again.
Also, are you a developer in Mautic?
or just god :stuck_out_tongue:

1 Like

yes, this I was doing earlier too. thank you again

Jajaja. Nooope, just a lucky and stubborn guy :joy:


Sorry, just came to this thread. From my view, the main mistake is to create contacts by using a “pageview” event! Of course, all those contacts will be overwritten, if it comes from the same source.

Don’t use pageview events for creating new users.