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

ParitMittal

Avatar

ParitMittal

ParitMittal

24-05-2016

Hi Vidya, 

Since you are using DTM to add to your current Implementation. I assume that you might have initially  checked the box "Page code already present" in Library Management tab in Adobe Analytics tool.

However, it’s important to note the following limitations with this approach:

1. Variables and settings configured in the DTM Adobe Analytics tool will not take effect.
2. Adobe Analytics variables set in page-load rules will not take effect.

These limitations occur because DTM is fully relying on the existing implementation to serve the AppMeasurement code and instantiate the s object.

But now by manual updation I assume that you did the configuration like the below snapshot and copied and pasted your s_code in the code editor.

If you have done what I just assumed above then it's perfectly fine.

Thanks & Regards

Parit Mittal