Callback for visitWebPage? | Community
Skip to main content
March 26, 2015
Question

Callback for visitWebPage?

  • March 26, 2015
  • 1 reply
  • 1846 views
I want to execute some JavaScript after Marketo makes its call to visitWebPage. Is there a callback for this function or an event I can detect? Can this be done on a Marketo-hosted landing page?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

August 23, 2016

I have the same question.

SanfordWhiteman
Level 10
August 24, 2016

There's no builtin hitCallback as there is with GA.  My "Munchkin Enhanced" adapter adds this capability into Munchkin.  But can I ask what you're using it for?  There may be another way.

August 25, 2016

Thanks for your reply Sanford. I was hoping for a callback after the Munchkin cookie is set, so I may send the cookie to another domain.  I assumed Munchkin wouldn't call visitWebPage until that cookie had been finalized, so I was first probing for one there.  Then I later discovered a function called Munchkin.createTrackingCookie but couldn't find any documentation on this, certainly none with any mention of a callback, so then attempted to bind a callback of my own to that but ran out of time figuring out the art of doing that in JS.  So I ended up setting an interval to check for the cookie after the munchkin script is requested.  That seems to work fine, just not as elegant.