Cookies issue

Hello Everyone,
Can any one guide me how i can delete cookies after logout. please help is there any function in mautic.
issue i am facing:- because cookies are not deleting so whenever i am signup with other account it will over-ridding the previous data And i think it is happing because cookies are not deleting.
Can someone help me on this.
Regards

Hi, please use the RemoveCookiesForSite plugin for chrome. It works well.
You can also do testing in incognito mode, or use another browser.
Good luck!

Do you mean - You are deploying Mautic for a client?
The problem is, if you remove the admin cookie, you will start tracking of the website for admins. That can lead to even more confusion. All statistics will be messed up.
Joey

Hello @joeyk
What is mean is :-

  1. Client is not going to clear cookies every time.
  2. They will not open mautic in incognito mode or They will not install any plugins
    its a lengthy process.
    So What i am asking is that is there any other way to do it from dev side. so that client will not bother about this things.

#discussion please help it is very urgent
Regards

Hi,

I understand your point.
To my knowledge there is no such modification at this point.
Maybe you can create this by modifying the logout sequence.

Disabled tracking for admin is a very good feature.

Joey

1 Like

Hello @joeyk,
Thank you for quick reply.
I want to mentioned one more thing that I have installed mautic for my webapp. So what happen is if same client is signup twice the contact getting merged. it is not creating new contact.
And Customer who is coming on my website they will not install plugins.

Regards,

Okay, I think you confused me with the words client and contact.
What do you mean by ā€˜Signupā€™? Filling out a form?
If filling out a form is a signup for you than Mautic has a solution: you need to use Kiosk mode for the form you are using:

image

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.

Regards

Hi,
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, amit123@gmail.com And after logout if i am signing up again with different data like:- Sumit, kumar, sumitkr23@gmail.com. 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.
Regards,

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: ā€˜my@email.comā€™, firstname: ā€˜Johnā€™});

Regards,

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 ā€œpanel.bumbl.itā€
so, is there any functionn that removes that cookie? which come from my server.

Hello,

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?
Joey

BTW, I noticed, that bumbl.it 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. mautic.myapp.com).

  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,".myapp.com"). 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: