Error in DTM when created a new property and added new rule with javascript

Avatar

Avatar

vidyar30267388

Avatar

vidyar30267388

vidyar30267388

20-05-2016

I have created a new property in DTM. Added header and footer code from DTM in the new website. I am using adobe's s_code version which i have set in the property. When I created a page load rule for custom tracking of the navigation it says "Uncaught Reference Error" s is not defined.

The page load rule that i have added is //links tracking

$("a.top-nav-link").click(function() { _satellite.notify('top nav clicked'); var tophatlinks = "ntap:TH:" + $(this).text(); s.eVar14 = tophatlinks; s.linkTrackVars = "eVar14"; s.tl(this,'o'); });

But If i use event based rule it works and doesn't give the error. Since I have to use many click events I thought of adding one page rule and add all the custom tracking there. But this is not working. Any thoughts?

View Entire Topic

Avatar

Avatar

vidyar30267388

Avatar

vidyar30267388

vidyar30267388

20-05-2016

I made it work by adding custom s_code while updating the property. Adding s_account and commenting some unnecessary code it is working. Can you please let me know if this is the right way to fix this issue?