Track page tag | Community
Skip to main content
July 7, 2015
Solved

Track page tag

  • July 7, 2015
  • 2 replies
  • 4036 views

Hi,

I would like to understand if Munchkin can track page tags? I want to put two standard tags on all the pages, say Tag_Product and  Tag_Solution, would like to add leads to appropriate lists based on their page visit history. Example, if a leads visits a page with Tag_Product = "Network", i would add them to network list, or they visit a page tagged with Tag_Product = "Sever" I will add them to server list.

Is there any out of box, or any other recommended solution/alternatives?

Thanks for reading and your help! I will be compiling and sharing the answers for the benefit of the forum.

Deepak

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Thanks Sanford. Sorry that I am not a java script guy (already put in an idea to create this as feature).

Is this what you mean

!-- Marketo -->

jQuery(function($){
$.ajax({
url: document.location.protocol + '//munchkin.marketo.net/munchkin.js',
dataType: 'script',
cache: true,

success: listener( {
var MOKeywords=document.head.querySelector('META[name="keywords"]');
if (MOKeywords) document.location.hash = "MOKeywords:" + MOKeywords.getAttribute('content');
});

success: function() {
Munchkin.init('009-RUR-657');
}
});
});


I mean literally all the JS I posted goes inside

success: function(){

}

Honestly the fact that you're loading Munchkin asynchronously is making it harder for you to customize the code because you're not a JS guy. You'd be better off using the regular embed code and putting it at the bottom of your HTML.  I'm not always a fan of loading Munchkin.js async because the very thing that makes async attractive -- doesn't interfere with other assets or page rendering/navigation -- is also leaving room for Munchkin to fail to register a page view before the user navigates away from the page. Of course in most cases it's beneficial, but in specific edge cases you might lose a log entry because the page has been told not to wait for Munchkin.js before moving on.

2 replies

Casey_Grimes2
Level 10
July 7, 2015

Hi Deepak,

I'm assuming by tags, you mean parameters at the end of your URL? Something like google.com?Tag_Product=Network&Tag_Solution=StuffIn that case, you can simply use a "Visited Web Page" filters with the Querystring constraint (say, contains Tag_Product=Network) and then have a flow step to add them to a static list (or, alternately, just make a smart list that does it all in one go.)

July 7, 2015

Hi Courtney, thanks for responding. Indeed I want to track the HTML mega tags, that will be put under the HTML code. It will not reflect on the URL.

Deepak

Casey_Grimes2
Level 10
July 7, 2015

Ahhh, I see now.

In terms of the meta tags, the big issue is going to be if there's any categorical structure that notes something is part of a meta tag; Marketo doesn't really do a good job parsing existing data.

One solution you could consider is to do a quick JavaScript call with this using faux URLs; let's say, for instance, you have

<meta name="product" property="text" content="This is a product" />

As a meta tag in the header of your page. You could do something akin to

<script src='munchkin.marketo.net/munchkin.js' type='text/javascript'></script>
<script>
Munchkin.init('###-###-###');
   var x = document.getElementsByTagName("META");
var txt = "";
var i;
for (i = 0; i < x.length; i++) {
    if (x[i].name=="product")
    {
        Munchkin.munchkinFunction('visitWebPage', { url: '/meta-tag/product'});
     }
  
}   
</script>

Where you would have Marketo record a fake URL when someone visits a page with the meta name of product. This code would obviously need to be tweaked to the parameters you're using, but it'll at least generate something in Marketo to generate lists with.

Elliott_Lowe1
Level 7
July 8, 2015

Deepak, perhaps you should submit an Idea to add a page's meta tags to the Visits Web Page activity as well as including those as a Constraint on the Visited Web Page filter and Visits Web Page trigger.  That would be the best way to handle this as an out-of-the-box function in Marketo.

SanfordWhiteman
Level 10
July 8, 2015

Even better/in addition, if there were an official way (rather than a hack) to customize the first Visit Web Page from Munchkin::init, then we could code up whatever we want.