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!
Solved! Go to Solution.
Views
Replies
Total Likes
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>
Views
Replies
Total Likes
Hi
Please have at this documentation, i hope this will help you:
// Tracking External Links
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Thank you! Unfortunately I don't configure SiteCatalyst via CQ. I do it via DTM and a header and footer :(
Views
Replies
Total Likes
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>
Views
Replies
Total Likes
Thank you! So I need to put in the domains for the external URLs, correct? We will be creating these infographics on a weekly basis and they will all have different links to different domains. Is there any way to tell SiteCatalyst to just track clicks regardless of domain without disrupting my analytics on the remainder of the site?
Views
Replies
Total Likes
OwlyChick wrote...
Thank you! So I need to put in the domains for the external URLs, correct? We will be creating these infographics on a weekly basis and they will all have different links to different domains. Is there any way to tell SiteCatalyst to just track clicks regardless of domain without disrupting my analytics on the remainder of the site?
Instead of 'attr' try using prop, it should give you the full URL including domain
destURL = $(this).prop("href");
Views
Replies
Total Likes