I am not able to set eVars/Props in DTM custom script.
Hi,
I want to set eVars,events and props using custom script, but I am facing couple of problems.
- It doesn't recognize any reference of s object
- 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.
- I tried using below code but it's not working
var s = _satellite.getToolsByType('sc')[0].getS();
s.linkTrackVars="prop1,events";
s.linkTrackEvents="event1";
s.events="event1";
s.prop1="test";
showing below error message in console "Cannot set property 'linkTrackVars' of null".
Kindly let me know how to set eVars and props by using Custom script in Page load Rules/ Even based rules( DTM)
Thanks & Regards,
Satish Kumar G