Track all links on page regardless of being internal or external

Avatar

Avatar

OwlyChick

Avatar

OwlyChick

OwlyChick

14-03-2016

I need to be able to track clicks on different links within an infographic on a page. I've been told ClickMap does not track links to external sites. What is the easiest way to accomplish this? I do all my edits to code within DTM. Thank you!

View Entire Topic

Avatar

Avatar

JillsMatthew

Avatar

JillsMatthew

JillsMatthew

16-03-2016

OwlyChick wrote...

Thank you! Unfortunately I don't configure SiteCatalyst via CQ. I do it via DTM and a header and footer 😞

 

Hope this helps! You can configure DTM to use the same method

<script>   $('a').on("click",function() {     s=s_gi(s_account);     s.linkTrackVars = 'prop10';     destURL = $(this).attr("href");     s.prop10 = destURL;     s.tl(this,'o','Link Clicked');     console.log("Clicked link is: ", destURL);   }); </script>