We recently updated our domain and are attempting to keep tracking across both domains. Using this older thread: https://nation.marketo.com/t5/Product-Discussions/Munchkin-Tracking-Multiple-Sites/td-p/132194 and the postMessage API I have been able to set up cross domain cookie tracking, however I am a bit stuck on the next steps.
I see "_mkto_trk" and am wondering if this is the correct key to target, and if so, what is the recommended practice for doing this. It looks like if a visitor hasn't opted into any material (filled out form) marketo still assigns a value to this cookie. Would it make sense to see if "old domain cookie value exists" and then extract that value and replace "new domain cookie value" with the old one? Will this allow for leads to be tracked across domains?
Thanks in advance
Did you check developers.marketo.com?
My understanding was that on multiple sites, the Lead will be assigned multiple cookies. They won't be merged until the Lead fills out a form on two or more sites with the same email address.
(assuming dupes aren't an issue here).
I have checked there. I understand that the lead will be assigned multiple cookies. We would like to avoid having them opt in again if they already have on the old domain and also do not lose any previous visitor tracking associated with that web activity.
That is the right cookie name, but you can't simply overwrite the current cookie value, because it will be formatted for the original domain. You have to also set the visitorToken init option to the value of the cookie (which will then ignore the formatting discrepancy).
Thank you for the reply and forgive my ignorance but just so I understand the entire process correctly:
1. Read _mkto_trk value from previous domain
2. Extract _mkto_trk value from previous domain for use on new domain
Is this the correct sequence of events? And if the lead has the cookie from the previous domain then we can merge all of the tracking data together, without requiring the lead to opt in again?
Thanks in advance for all your help.
Yes, that's the process.
Though when the same token is being used, it's not really a "merge", it's literally putting activity log entries under exactly the same key in the database. The db reflects it as the same continuous session, it has no way of knowing how the key was constructed on the client.