Marketo Cookies Across Multiple Domains

Many new customers are confused as to how Marketo’s munchkin code works when it is applied on different, separate domains. They often expect to be able to automatically track behavior on multiple domains just by using the munchkin code and cooking someone once.

Unfortunately, (and fortunately) it doesn’t work this way. If you could set a cookie for any domain, well, you could inject your munchkin javascript to any site and set a cookie for any domain. Think of the privacy laws and security havoc this would wreak.

Marketo’s munchkin uses what is called first party cookies. Put simply for non-technical folks, this means that each record in your database must be cookied in each domain first before we can track their behavior.  The good news is once a record is cookied in more than one domain all their web activity is combined into the activity log of their record in Marketo.

As a reminder, these are the primary out of the box ways a marketer can set cookies on a domain with very little, if any, technical resources involved:

  • Marketo Forms – embed Marketo form(s) on the domain so that once someone fills out a form they are cookied
  • Click links in an Marketo email - send an email to your database with links that when clicked will have the record land on a page on the domain where the munchkin code has been applied. When the person clicks the link, they are cookied

If you have a technical resource available to you, there are other ways you can set cookies using our APIs and no Marketo forms or emails. While the two methods above require very little technical resources, you do need a lot of creativity in creating your call to actions – which is exactly what marketers do best.

3502
6
6 Comments
Gerard_van_den_
Level 3

Thanks Jodi, very helpful and clear explanation. Can you maybe tell me where to find more information on how Marketo and cookies behave, like for example when people fill out multiple forms using different email addresses, in different browsers on the same computer etc? I find it hard to get an full understanding of this part of the story, and the default documentation of Marketo isn't very helpful on this topic.

Thanks!

SanfordWhiteman
Level 10 - Community Moderator

when people fill out multiple forms using different email addresses, in different browsers on the same computer etc?

Different browsers on the same computer are equivalent to different browsers on different devices. Their cookie stores are completely siloed off from one another.

Same goes even for different browser profiles in the same browser on the same computer, which are basically defined by not sharing cookies/caches/history/etc.

Filling out forms, at the same domain, in the same browser profile -- thus using the same cookie over time -- using different email addresses is a very different question. The default behavior is to reassociate the web session with the lead attached to the most recent email address. But there are many ways for a web developer change this behavior.

You're really not going to get a full understanding of cookies from the Marketo docs. This venerable technology is actually only understood by a small subset of web developers, I've found (tilted toward those who've been around for awhile ). There are a lot of Community posts that shed little bits of light and I strongly recommend you read my blog, since AFAIK it's the only place you're going to find deep dives from a Marketo-aware person: my Munchkin posts are under http://blog.teknkl.com/tag/munchkin/.

Gerard_van_den_
Level 3

Hi Sanford, your information is highly appreciated, great to have additional resources available!

Just to make sure I understand this completely: when you state

The default behavior is to reassociate the web session with the lead attached to the most recent email address.

Just assume in browser 1, I have a cookie that is based on a form fill out where I used email test1@test.com. Next I close this browser. In browser 2 I have filled out a form using email address test2@test.com. If I would open browser 1 again and fill out another form using email address test2@test.com, are you saying that everything I did and will do within that web session (and even future sessions) will be connected to the lead in MKTO with email address test2@test.com?

thanks for clarifying 🙂

Gerard.

SanfordWhiteman
Level 10 - Community Moderator

Just assume in browser 1, I have a cookie that is based on a form fill out where I used email test1@test.com. Next I close this browser. In browser 2 I have filled out a form using email address test2@test.com. If I would open browser 1 again and fill out another form using email address test2@test.com, are you saying that everything I did and will do within that web session (and even future sessions) will be connected to the lead in MKTO with email address test2@test.com?

Yes, the session in browser 1 -- there really is only a single Munchkin "session" in each browser profile, unless 2 years go by with no activity or the user deliberately clears their cookies -- will be associated with the Marketo lead with email test2@test.com.

This default behavior can be circumvented using custom JavaScript (that's how we create referral forms, which are forms that keep the original lead associated with the session, even though the form is filled out on behalf of others).

You can also add custom behavior so the existing lead's email address is changed to the new email address, as opposed to upserting a new lead. This requires coordination between the form and back-end (i.e. Flow) logic.

Anonymous
Not applicable

Hi Jodi,

Are you saying that we can use one Marketo munchkin tracking code on multiple domains? I have been reading several articles online and this seems to be a little confusing. I have a few clients that own multiple domains and are consolidating their marketing automation platforms to one Marketo instance. Can we use the same tracking code on all domains? Other articles mentioned creating separate workspaces and partitions as well. I would appreciate any insight or experiences you can share on this matter if you have time. Thanks!

SanfordWhiteman
Level 10 - Community Moderator

You can use the same tracking code on all the domains you want. (In fact, it's impossible not to do this, since you don't have multiple Munchkin IDs.)

Marketo doesn't consider any web properties to be specifically associated with your Marketo instance.

As I detailed above, the same Munchkin tracking cookie cannot be shared across different registered domains, though it can be shared across all subdomains of a registered domain. The cookies set in a given browser for domain example.org will not be seen when the end user visits example2.net, nor vice versa. (This is a browser security rule since forever!) Again, though, each of these sites can use the exact same Marketo tracking code snippet & Munchkin ID.

If you have more questions about this, please open a thread in Products​ as the Support comment section is cumbersome.