Suppressing the Munchkin

Anonymous
Not applicable

Suppressing the Munchkin

We use Munchkin tagging on our website to track pageviews and clicks on links. I'd like to 'tag' content categories within our CMS and push these through to Marketo, so that when someone visits a tagged page it will push the category into Marketo alongside the page view. From there, I can do cool stuff like scoring based on the different content categories.

I could use the Munchkin call 'visitWebPage' to insert categories in the 'params' argument, eg:

Munchkin.munchkinFunction('visitWebPage', { url: '/productA', params: 'category=foo' });

However, as the Munchkin.init() call also causes a Visit Web Page activity, I will end up with a duplicate activity for each page view.

Does anyone know how to suppress the initial visitWebPage event created by the Munchkin.init() command (while still initialising the script)? Or any other suggestions for pushing through content categories?

Many thanks!

Alun

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Suppressing the Munchkin

There is a way to suppress the default visitWebPage completely, but it's not something I'd feel comfortable recommending in public.*

Rather than that complex route, I'd recommend something simpler.  Change the document.hash before you run Munchkin.init(), as in MktoMunchkin :: Tag before Init​. (Naturally if you're already using hash-bang logic you'll have to account for that.)

Anonymous
Not applicable

Re: Suppressing the Munchkin

Hi Sanford, would you be willing to please share the secret method you eluded to for how to suppress visitWebPage completely during Munchkin init (default behavior)?

I load Munchkin twice:  first on a cross-domain request page (loaded silently in an iframe), and then once again on the main page (using the cookie from the XDR page to associate the leads).  I simply don't need to know when users load that XDR page.