SOLVED

Re: Disable clickLink functionality from Munchkin?

Go to solution
Casey_Grimes
Level 10

Disable clickLink functionality from Munchkin?

I have a edge case where I need to be able to send a faux web page visit via Munchkin in an environment that is otherwise not very Munchkin-friendly. While I'm able to have visitWebPage work without incident, the way the environment is set up causes errors when clickLink is called. Essentially, I'm looking for the equivalent of apiOnly: true with the behavior reversed (so clicks are disabled but webPageVisit is still possible--don't particularly care about the page visit(s) itself as much as the faux visit). Is there any way to disable click tracking functionality?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Casey_Grimes
Level 10

Re: Disable clickLink functionality from Munchkin?

A final follow-up on this thread: essentially, Marketo couldn't diagnose why this error/lack of href pickup happened (for reference, this was in response to a faux, href="#" button on a custom force.com single-page app) and the only way forward to solve this seems to be write the data elsewhere, then reconcile it for reporting.

View solution in original post

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Disable clickLink functionality from Munchkin?

Add class="mchNoDecorate" to all the links.

Casey_Grimes
Level 10

Re: Disable clickLink functionality from Munchkin?

Unfortunately, even setting .mchNoDecorate before Munchkin initializes doesn't seem to stop the actual call out to mktoresp.com, which is actually the core problem.

Looking at the problem from another angle, though: part of why the clickLink activity is failing is that _mchHr isn't defined; is there a way I can force a value there so at least something passes (or at least silently fails and lets other JS process), assuming I can't really alter the href of a link?

SanfordWhiteman
Level 10 - Community Moderator

Re: Disable clickLink functionality from Munchkin?

Are these links without any hrefs at all?

mchNoDecorate does stop all network traffic, but an unhandled exception must be causing it to be ignored.

You can't add an href="#"? After all, an <a> without an href, while valid HTML5, is not supposed to be used as a navigation source (only a target).

Jay_Jiang
Level 10

Re: Disable clickLink functionality from Munchkin?

since mchNoDecorate doesn't work, download the munchkin beta script and munchkin script, edit them to remove the click trigger function and host them yourself

SanfordWhiteman
Level 10 - Community Moderator

Re: Disable clickLink functionality from Munchkin?

Until the next bugfix comes out and you don't get it.

I've been bitten by the "just fork the library" concept before. It didn't end well.

Casey_Grimes
Level 10

Re: Disable clickLink functionality from Munchkin?

I did flirt with the idea of hardcoding out the clickLink functionality for Munchkin and just deploying that version of the script to this environment, but as Sandy mentions, once you do that you're really setting yourself up for potential issues down the line. Besides, I've been talking to support on this specific use case (because I doubt this scenario is that unique, and other best practices are in place) to see if a long-term fix can be applied for the good of the product overall.

Casey_Grimes
Level 10

Re: Disable clickLink functionality from Munchkin?

A final follow-up on this thread: essentially, Marketo couldn't diagnose why this error/lack of href pickup happened (for reference, this was in response to a faux, href="#" button on a custom force.com single-page app) and the only way forward to solve this seems to be write the data elsewhere, then reconcile it for reporting.