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

How to use DTM account settings for s_code.js?

Avatar

Avatar
Validate 10
Level 2
Michael_Schuber
Level 2

Likes

11 likes

Total Posts

35 posts

Correct Reply

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

Avatar
Validate 10
Level 2
Michael_Schuber
Level 2

Likes

11 likes

Total Posts

35 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Michael_Schuber
Level 2

15-10-2015

Using the JS 1.2. Appmeasurement s_code you have to create the tracking object

s = new AppMeasurement();
s.account="xxx";

How can you use the account variables of DTM in this setting to select the right account dependent on the embed code (Staging or Live) ???

Thanks,

Michael

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 5
Adobo_Supportus
Level 5

Likes

18 likes

Total Posts

187 posts

Correct Reply

73 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 5
Adobo_Supportus
Level 5

Likes

18 likes

Total Posts

187 posts

Correct Reply

73 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
Adobo_Supportus
Level 5

15-10-2015

Update: That conversation was moved to our new DTM specific forum and is now located here: http://help-forums.adobe.com/content/adobeforums/en/marketing-cloud-forum/activation.topic.html/foru...

Answers (2)

Answers (2)

Avatar

Avatar
Level 1
maschak69992276
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
maschak69992276
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
maschak69992276
Level 1

15-10-2015

Hi Michael,

there is a code snippet available to be able to automatically grab the account setting var from DTM and use it in s.account:
http://help-forums.adobe.com/content/adobeforums/en/marketing-cloud-forum/adobe-marketing-cloud.topi...

 

Greetings,
Mascha

Avatar

Avatar
Validate 1
Level 9
ericmatisoff1
Level 9

Likes

356 likes

Total Posts

154 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Level 9
ericmatisoff1
Level 9

Likes

356 likes

Total Posts

154 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
ericmatisoff1
Level 9

15-10-2015

Hey Michael,

Not sure if you've figured this out yet or not. If not, my recommendation is to put dev report suites in the account section of DTM and use the s_code editor to create logic that decides which report suite to send the data to. In my experience, the s.account variable in s_code overwrites the items defined in the Tool's Production/Staging Account/Suite.

I've also noticed that developers seem to get confused by (or simply forget to) remove the -staging.js in the <head> embed code for DTM. To get around this, I've started only giving developers the production embed code. I then use the s_code editor to send the data to the proper report suite (based on URL/domain).

Finally, you can use the DTM Switch Plugins to force the staging library in your staging environment for testing: 
http://help-forums.adobe.com/content/adobeforums/en/marketing-cloud-forum/adobe-marketing-cloud.topi...

Hope that helps! I'm happy to entertain a discussion regarding doing things a different way 🙂

- Eric