How to track button clicks for pop-up form in Marketo? | Community
Skip to main content
May 8, 2017
Question

How to track button clicks for pop-up form in Marketo?

  • May 8, 2017
  • 2 replies
  • 2837 views

Hi

We have a pricing page on our site where you can see different plans and in every type of plan there is a button "Start a Free Trial". A click on each of these buttons opens a pop-up form (not Marketo one, our own) for sign up completion. Can we track the link on this button? So that way we can see whether the user clicked on the button from basic plan or from PRO plan in order to sign up for a trial. We want to use that differiation for Lead Scoring we have.

I know Marketo tracks web visit or link clicks, but can we also track clicks on pop up forms? And if so how to do it?

Thank You
Boris

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

2 replies

Level 5
May 8, 2017

Hi Boris!

I think for this kind of use case you would want to use the munchkin API to push custom parameters to your Marketo instance related to this click. For this you would need a server-side post, here's the API reference: http://developers.marketo.com/javascript-api/lead-tracking/api-reference/

Not sure how optimal option two is for page load times but you can technically embed an invisible Marketo form and submit it with onclick events using JS, this would work without server-side code: http://developers.marketo.com/blog/make-a-marketo-form-submission-in-the-background/

Maybe @Sanford Whiteman​ has some good recommendations here?

SanfordWhiteman
Level 10
May 8, 2017

Like Erik says, you just need to pick up this click and send it to the Munchkin APi using Click Link.  Then it'll look exactly like the automatically flagged events. Munchkin can't know which internal (same-page) clicks are interesting or not, so you have to help it out if you have lightboxes linked to non-<A> elements or to local <A> hrefs.  For example, if you had a button, just:

document.querySelector('#myButtonId').addEventListener('click', function(e){

  Munchkin.munchkinFunction('clickLink', { /* ... click link options here... */ );

});