SOLVED

Clicked Link on website behaviour

Go to solution
Charlie_Davies
Level 1

I have recently been testing a new staging site with Munchkin deployed.  All tracking is working as expected with one exception:  'Clicked Link on website' activity tracking is only occurring on the first link clicked on a page after the page has been loaded.  The page in question has multiple links to pdf downloads.  All of these links have the same url but different parameters to identify the appropriate pdf.   All are standard <a> tags with the urls stored in the href attribute and there are no event listeners doing anything fancy.

Is this expected behaviour or do I need to raise a support case?

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

When Munchkin believes the page is being unloaded, it unhooks click tracking. This is expected.

 

Are you adding the download attribute to the <a> tag? If not, you must have an event listener stopping the default behavior (which is indeed fancier than standard <a> interaction). 

 

If you provide your URL we can look further.

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

@Charlie_Davies please return and check replies.

SanfordWhiteman
Level 10 - Community Moderator

When Munchkin believes the page is being unloaded, it unhooks click tracking. This is expected.

 

Are you adding the download attribute to the <a> tag? If not, you must have an event listener stopping the default behavior (which is indeed fancier than standard <a> interaction). 

 

If you provide your URL we can look further.

Charlie_Davies
Level 1

@SanfordWhiteman sorry for the delay - been having significant problems accessing Marketo Nation with my Adobe ID.

 

I am afraid that I can't provide you with access to the problem page as it is on a client staging site, but based on your suggestions, I tried a couple of things and I think you were correct that Munchkin was seeing the page become unloaded upon click, however adding the download attribute didn't fix the problem but adding target="_blank" did.

SanfordWhiteman
Level 10 - Community Moderator

OK. For the download attribute to be enabled (in general, not a Marketo thing) the target must be on the same origin. Where download works, it does turn off Munchkin’s unload behavior.

 

Still curious about what you were doing to make Marketo think you were unloading the page — it’s far more common for beforeunload to not fire when you wanted it to, rather than the other way around!