Clicked Link Tracking - Modal Links | Community
Skip to main content
Community Advisor
January 25, 2016
Question

Clicked Link Tracking - Modal Links

  • January 25, 2016
  • 1 reply
  • 1959 views

we embedded a lightbox video on our homepage using a modal link, but I'm not sure how/if I can track (using munchkin) who's clicking it? Ideas?  I tried standard 'link name is' and 'link name contains' but no results.

1 reply

SanfordWhiteman
Level 10
January 25, 2016

Pls post your URL.  Depending on how the modal is launched (i.e. pure JS on a non-link element) Munchkin may not attach to the link, so you have to trigger clickLink ​in code.

JDNelson1Community AdvisorAuthor
Community Advisor
January 25, 2016

<a data-target="#ag-modal-hero-home" data-toggle="modal" data-thevideo="youtube.com/embed/XYZ" class="Video_link"><span style="color:#fff;">Watch Video</span></a>

SanfordWhiteman
Level 10
January 25, 2016

Put a synthetic href on that link, for example

     href="?watch-video=XYZ"

That's the quick-and-dirty way to get it picked up. If you need to combine the main document's query string with the video info you'll need to do a little more.