Your contacts often use shared devices? Then tracking users logged into your website without being merged must be a problem for you too. Here is the solution! Clear tracking cookies during logout so that next time a user logs in the two won't be merged.
Vanilla Mautic’s tools provide a solution to track what pages do visitors – even anonymously – visit on our site.
If you also want to track users on a site where they can log in with a password, it’s a good idea to use the tracking code with the email added as a parameter after the user logged in. Setting the email identifies the contact toward Mautic that allows us to contact the user via Mautic messages. Also at the same time it istructs Mautic to log the following events (page visits) to the current contact.
But if another user logs in, Mautic does not change the IDs of the tracked contact, but treats as if the two different users were the same, thus merging them.
The cookie of the currently tracked contact is always stored to the Mautic domain. Deleting a cookie on the host page therefore does not change which user Mautic tracks.
How does it work?
Mautic JS API
Tracking takes place on the client side, so the deletion of the cookie must also take place on the client side. The feature is integrated into the Mautic JS API.
What can it be used for?
If a user logs out, we can stop tracking by calling the appropriate JS function.
Replacing a Tracked User at login
When a user logs in, you can invoke the JS function to delete the tracking cookies to prevent two different users from being merged when identifying the logged-in user to Mautic with an email address.
A bővítmény használatához szükség van a phpbolt nevű php kiterjesztés futtatási környezetbe való beépítésére.