Recreation of "_mkto_trk" cookie // understanding the cookie syntax

WolframLotz
Level 4

Recreation of "_mkto_trk" cookie // understanding the cookie syntax

Hi everyone, 
if a user visits a page with a mkt_tok-link and the munchkin cookie is already associated the associated user goes before the user who was identified via the mkt_tok. Or to say differently the existing cookie will not be reassigned to the token user. 

 

I have a case where the token user is more important than the already associated user and the "browser" should be reassigned to the other user. 

Do you know any simple way to do this on a page when the Munchkin Code is already initiated?
Without reloading the page?

I tried to delete the cookie and re-initiate the Munchkin Code. 
I tried to delete the cookie and force a cookie creation via Munchkin.createTrackingCookie().
I tried to delete the cookie and the whole Munchkin Code and reload the code to reinitiate it. 

Unfortunatley non of the above worked for me. 
It looks like the Munchkin code blocks each recreation of the cookie if it was found or created once during the page view. Is this right?

From what I understood from other posts I got the impression that the cookie itself can be created by our self by creating a cookie following the structure of the cookie (example: id:561HYG937&token:_mchmarketo.com137455265641190718) are there specific requirements for the "number" part of the cookie (137455265641190718) or do you know another simpler way?

If I create a custom cookie would it be used automatically? Or do I have to hold something in mind for this?

Thanks and kind regards
Wolfram


2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Recreation of "_mkto_trk" cookie // understanding the cookie syntax


I tried to delete the cookie and re-initiate the Munchkin Code.

You can’t “re-initiate” code after it’s already run, the global vars have already been created, etc.

 

For your situation you want to delete the cookie before Munchkin initializes the first time. Everything else will be taken care of automatically.

WolframLotz
Level 4

Re: Recreation of "_mkto_trk" cookie // understanding the cookie syntax

Hi @SanfordWhiteman 
many Thanks. Unfortunately, in my case, it's not possible to handle the cookie before the Munchkin code has been initialized. At least not without changing the way how the code is injected into the page from our CRM. Because Munchkin code is part of our common DOM and all additional functions are loaded and executed afterwards.

 

Kind regards 
Wolfram