Link Tracking Event Never Fires (all else OK) | Community
Skip to main content
mitchell_teixei
Level 3
October 16, 2015
Solved

Link Tracking Event Never Fires (all else OK)

  • October 16, 2015
  • 3 replies
  • 1966 views

Hello - I would like to track custom links and when they are clicked, I'd like those clicks to register as events as well.

I see everything tracked EXCEPT for the events...  any ideas?  (please see code below)

 

Thanks for any ideas/suggestions, etc!

 

jQuery(document).ready(function($) { $(".TabbedPanelsTab").each(function() { $(this).click(function(event) { // when someone clicks these links event.preventDefault(); // don't open the link yet s.linkTrackVars="eVar9,events,prop16"; s.linkTrackEvents="event6"; s.events="event6"; s.prop16=$(this).text(); s.eVar9=$(this).text(); s.tl(true,'o',$(this).text());    // create a custom event }); }); });    
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Alexis_Cazes_

I checked the code that you provided and it looks fine. The event should in theory be sent.

can you please check with a packet monitor like httpfox or charles :

1.If the image request is sent successfully : you should have a status of 200 ok

2.What is sent in the image request : you should be able to see any variables being sent. The pe parameter should be equal to lnk_o

Here is the list of all the parameters that can be sent : https://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#kb-using-digitalpulse-debugger

The common cause of link tracking not working is that there is not enough time for the image request to be sent

3 replies

Alexis_Cazes_
Alexis_Cazes_Accepted solution
Level 10
October 16, 2015

I checked the code that you provided and it looks fine. The event should in theory be sent.

can you please check with a packet monitor like httpfox or charles :

1.If the image request is sent successfully : you should have a status of 200 ok

2.What is sent in the image request : you should be able to see any variables being sent. The pe parameter should be equal to lnk_o

Here is the list of all the parameters that can be sent : https://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#kb-using-digitalpulse-debugger

The common cause of link tracking not working is that there is not enough time for the image request to be sent

October 16, 2015

I've been having this issue for a while and cannot figure it out.  Did you ever figure it out?  It seems as if the s object changes when it gets into the s.tl function.Any insight will be helpful.

Thanks in advance

Updated with code.  

function navTrkEvent(elem, evnt) { elem.each(function() { jQuery(elem).click(function() { s.linkTrackVars = 'events,prop73,prop74'; s.events = s.linkTrackEvents = evnt; s.prop73 = jQuery(this).text(); s.tl(this, 'o', s.prop73); }); }); }

The function is called like this

navTrkEvent('div.ib-content','event75');

What I have observed is everything looks fine as I step thorough the code.  meaning s.events is set to event75 and the other variables are set correctly.  Once I step into the s.tl function, s.events is NOT set correctly, but s.prop73 IS set correctly.  I take this to mean that I'm looking at the same s object  

TBattle

Alexis_Cazes_
Level 10
October 16, 2015

Hi Tyrone,

 

If you provide more details on your issue I can look into it. If you opened a separate post please provide the link and I will look into into it.

 

Best regards.

 

Alexis Cazes