Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

I am not able to set eVars/Props in DTM custom script.

Avatar

Avatar
Validate 10
Level 2
satishk38346838
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 10
Level 2
satishk38346838
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 1
Affirm 1
View profile
satishk38346838
Level 2

24-10-2016

Hi,

I want to set eVars,events and props using custom script, but  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.
  3.     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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct Reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct Reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

26-10-2016

Hi Sathish,

In  Event/ Page Load rules,   "s" object is accessible inside  "Custom Page Code" section of Adobe Analytics Tab even without using "var s=_satellite.getToolsByType("sc")[0].getS();".  

"var s=_satellite.getToolsByType('sc')[0].getS();" should always be used in the cases when "s" object needs to referenced in ThirdParty/Javascript or Conditions section of Event/Page Load rule

This should have ideally worked. Can you please share your  DTM account details as well as URL of website in a private message so that we can debug the same at our end

Thanks & Regards 

Parit Mittal

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

339 likes

Total Posts

2,331 posts

Correct Reply

819 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

339 likes

Total Posts

2,331 posts

Correct Reply

819 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile
jantzen_belliston-Adobe
Community Manager

13-12-2016

Satish,

You may want to open a ticket with Customer Care. They have the ability to join you on a screen share session for troubleshooting if needed.

 

Regards,
Jantzen

Avatar

Avatar
Validate 10
Level 2
satishk38346838
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 10
Level 2
satishk38346838
Level 2

Like

1 like

Total Posts

31 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 1
Affirm 1
View profile
satishk38346838
Level 2

26-10-2016

Hi Parit

we have worked in this way. Also add this line "After setting var s=_satellite.getToolsByType('sc')[0].getS(); in Custom JavaScript we are getting following error "Cannot set property 'eVar28' of null" . But it's not working for us.  

I would like to know how globally we can set var s = s_gi() method in AppMeasurement. We want to set the props/eVars/events/Products using custom script in DTM.

Sharing account details may not be possible. Could we please have some session or desktop sharing to discuss about this?

Kindly provide the details in private message.

Thanks & Regards,

Satish Kumar G