Not able to use s.linkTrackVars & s.linkTrackEvents. | Community
Skip to main content
ParthaS
Level 2
October 16, 2015
Solved

Not able to use s.linkTrackVars & s.linkTrackEvents.

  • October 16, 2015
  • 5 replies
  • 3370 views

Hi Team,

 

I am using "Third Party Tag" section of DTM for hosting my code but in this section I am facing couple of problems -

 

1. It doesn't recognize any reference of s object.

2. I was able to create a reference of s object (var s=new Appmeasurement();) but not it doesn't recognize any of the methods of s object like s.linkTrackVars & s.linkTrackEvents.

 

So for custom link tracking how do I solve the problem of using s.linkTrackVars & s.linkTrackEvents in Third Party Tag section? In general how do I use s object in Third Party Tag section of DTM?

 

Please help.

 

Regards,

~Partha.

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_

Hi Partha,

The Adobe Analytics object from the tool is local to DTM web property and cannot be used as it is in the third party code section.

 

Use the following code:

var s = _satellite.getToolsByType('sc')[0].getS(); s.linkTrackVars="prop1,events"; s.linkTrackEvents="event1"; s.events="event1"; s.prop1="test"; s.tl(this,"o","test",null,"navigate");

All of the Adobe Analytics tool have a type of sc, so if you have more than one tool, make sure to select the right index.

Please confirm if it solves your issue.

 

Best regards.

 

Alexis Cazes

Senior Technical Support Engineer

5 replies

Alexis_Cazes_
Alexis_Cazes_Accepted solution
Level 10
October 16, 2015

Hi Partha,

The Adobe Analytics object from the tool is local to DTM web property and cannot be used as it is in the third party code section.

 

Use the following code:

var s = _satellite.getToolsByType('sc')[0].getS(); s.linkTrackVars="prop1,events"; s.linkTrackEvents="event1"; s.events="event1"; s.prop1="test"; s.tl(this,"o","test",null,"navigate");

All of the Adobe Analytics tool have a type of sc, so if you have more than one tool, make sure to select the right index.

Please confirm if it solves your issue.

 

Best regards.

 

Alexis Cazes

Senior Technical Support Engineer

ParthaS
ParthaSAuthor
Level 2
October 16, 2015

Hi Alexis,

 

Thanks for responding and your are absolutely correct.

 

I had already implemented it last week and it is working fine - that is the only way to do it. 

 

Take care,

~Partha.

satishk38346838
Level 2
October 25, 2016

Hi,

Same code, I have been implemented but showing "Cannot set property 'linkTrackVars' of null" in the console.

Kindly help how to set eVars,events and props using S object in custom script.

Thanks & Regards,

Satish Kumar G

Alexis_Cazes_
Level 10
October 26, 2016

Please provide the URL where we can test the issue.

satishk38346838
Level 2
October 26, 2016

I am working in my local environment. Kindly let me know how to set eVars and props by using Custom script in Page load Rules/ Even based rules( DTM) .

Need to follow any steps?  guide me .. :)