Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not

NestoJosa
Level 3

Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not

Hello again Marketo Nation,

Here comes yet another problem I was hoping you could help us solve.

 

First some background.

 

Goal:

  • Track user from landing-page on subdomain, to main site on top-level-domain
  • More specifically, the idea is to log a "Visit Web Page" in the "Activity Log"

 

Landing page:

  • On subdomain
  • Default munchkin switched off, custom munchkin added: only to set "2" as the domainLevel - in order to set the cookie at the correct top-level-domain
  • Not secured (http)
  • Cookie-script as the cookie-bar supplier

 

Website:

  • On top-level domain
  • Default munchkin
  • Secured (https)
  • GDPR Cookie Consent (Wordpress plugin), as the cookie-bar supplier

 

The problem:

The tracking is not (always) working. There is no "Visit Web Page" log after giving consent on the landing page, filling out the form and visiting the main site on the top-level-domain.

Most interesting, sometimes it does work (!?). But we have yet to find any pattern.

 

Further information:

The steps for test are

  1. give consent on landing page and fill out form
  2. visit main site on top-level-domain
  3. check that a "Visit Web Page" logs is present in the "Activity Log"

Note:

  • The custom munchkin, has only been added to the landing page on the subdomain, because we have concluded that there is no reason to change the default munchkin behavior on the main site - the cookie is already being place correctly, on the top-level domain.
  • The munchkin-cookie is being set.
  • On the main site - the cookie is set at the top-level-domain without a dot: example.com. But on the landing page, the cookie is set at .example.com (note the dot before example).

Questions

  • Is there anything in the setup, that you might think is causing the issue, e.g. landing page on http and main site on https for instance, or the fact that there are two different cookie-providers (one on the landing page and another on main site)?
  • Does anyone have experience with getting these confusing results, where it works on some cases, and in others not?

 

Any help would be much appreciated!

 

Best,

ernie

 

 

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not

There's one part here that doesn't make sense at a glance.

 

You set domainLevel when Marketo's "intuition" about the shortest private suffix is wrong.

 

For example, if your domain is example.ly, you need to set domainLevel to 2 to tell Marketo that you privately control example and the only public label is ly. Otherwise, it will assume the domainLevel is 3, which is wrong. You would set domainLevel on all your sites, though. Not just on pages.example.ly.

 

Other than that, there isn't anything specifically wrong with your setup. If the cookie is set at the shortest possible level, it'll be shared across both sites. And you can check easily if the same, single _mkto_trk cookie value is present across all your domains.

NestoJosa
Level 3

Re: Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not

Hi @SanfordWhiteman,

 

Thanks for your response!

 

I hope you don't mind that I ask for clarification.

 

You would set domainLevel on all your sites, though. Not just on pages.example.ly.

 

So, in the case where you operate out of Denmark, where the public label is dk, one must add a custom munchkin script (with "domainLevel": 2), to both the landing page on the subdomain e.g. news.exampel.dk AND on the top-level-domain example.dk.

 

This is the part that I don't get.

 

On example.dk, the cookie is already being set at the correct top-level domain: example.dk So why update this default behavior?

 

I compared the _mkto_trk cookie value, and its currently the same on news.example.dk and example.dk. But we are still getting non-consistent tracking results.

 

Thanks for your patience! I'm new to marketo and trying to better understand the system.

 

Best,

ernie

SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not


On example.dk, the cookie is already being set at the correct top-level domain: example.dk So why update this default behavior?

Because you're only getting lucky that the code has a fallback that sets it at level 2. It actually tries level 3, which happens to not exist at all. So to make sure the cookie is set consistently (on www.example.dk as well) always put in the domainLevel.

 

Now, if you're seeing the same cookie value at all levels, that indicates the cookie is shared. There's no reason for hits to be picked up from one domain and not the other. So the next step is to watch the Network tab and see if, indeed, the visitWebPage and clickLink XHR hits are being sent to Marketo.

NestoJosa
Level 3

Re: Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not

Thanks for the info!

 

I'm getting closer to solving this issue, and will share any insights along the way.

 

Best,

ernie

NestoJosa
Level 3

Re: Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not

Update:

 

The solution

- Force a refresh after user has accepted/rejected on the cookie-banner.

 

So, for future reference, if you experience that there is no tracking from a landing-page on a subdomain, to main-site on top-level domain, it might be because you need to force a refresh after a user has gives consent on the cookie-banner.

 

At least, this is what made the difference in our case.

 

Hope this helps someone in the future!

SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not


- Force a refresh after user has accepted/rejected on the cookie-banner.


That's not an acceptable solution as it can completely upset other analytics. A refresh isn't necessary in a proper setup. Cookies are set synchronously, so you can always know when the browser is fully prepped w/opt-in information.

NestoJosa
Level 3

Re: Munchkin tracking does not (always) work - sometimes it tracks, sometimes it does not

Hello again @SanfordWhiteman ,

 

Here comes a late reply.

I have unmarked my previous post as an accepted solution, in order for future googlers not to be misinformed.

Further information:
- We tried (for months) to get a better understanding of the problem via marketo support without any luck.
- In another setup, we managed to solve it via GTM triggers.
- In the future, I will try to re-create the faulty-setup and share it here on Marketing Nation to try get a better understanding of what is going on.

Best,
ernie