Adobe DTM s_code management

Avatar

Avatar
Validate 1
Level 2
666111666
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

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

Avatar
Validate 1
Level 2
666111666
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
666111666
Level 2

15-10-2015

Hi,

I just starting using DTM and I want my s_code being managed in DTM. My s_code currently include a lot of plugins. If I save all the complete code with configuration section, plugins....it works fine but satellite doesn´t rewrite the s_account variable. The resullt is that I always point to the same report suite in stage and live enviromment.
I can´t remove s_account setting of s_code ¿Is there any way to get the live and stage account numbers set in satellite from s_code?

Thanks.

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 3
Level 2
shawncreed1
Level 2

Likes

3 likes

Total Posts

25 posts

Correct reply

12 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 10
View profile

Avatar
Boost 3
Level 2
shawncreed1
Level 2

Likes

3 likes

Total Posts

25 posts

Correct reply

12 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 10
View profile
shawncreed1
Level 2

15-10-2015

We are looking at some ways of making this a built-in feature in the engine. There are a few things that make this tricky to implement in a way that works for everyone.

However, in the meantime, you can create a function similar to the following:

function getAnalyticsAccount() { for(var toolid in _satellite.tools) { if(_satellite.tools[toolid].settings.engine == "sc") { return _satellite.tools[toolid].settings.account; } } }

And then in your s_code you can use it like this:

var s_account = getAnalyticsAccount();

This will automatically get the values that you've set in the DTM interface and pass them to your s_code file.  The only caveat is that this will only work for the first Adobe Analytics tool you have installed in a given web property. If you have multiple Analytics tool instances installed in a single web property, the function above will only return the account value for the first one.

I hope this helps. Thanks for using DTM!

Answers (2)

Answers (2)

Avatar

Avatar
Boost 3
Level 2
shawncreed1
Level 2

Likes

3 likes

Total Posts

25 posts

Correct reply

12 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 10
View profile

Avatar
Boost 3
Level 2
shawncreed1
Level 2

Likes

3 likes

Total Posts

25 posts

Correct reply

12 solutions
Top badges earned
Boost 3
Boost 1
Affirm 5
Affirm 3
Affirm 10
View profile
shawncreed1
Level 2

15-10-2015

My apologies; you're correct. That prefix was used on some older legacy accounts but I don't believe it's in use anymore.

-Shawn

Avatar

Avatar
Validate 1
Level 2
666111666
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

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

Avatar
Validate 1
Level 2
666111666
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
666111666
Level 2

15-10-2015

Many thanks

It works but I had to remove the first member of condition

(toolid.indexOf("satellite-") == 0 

var toolid just stores hex identifiers for tools (no matches for  'satellite' string)

Regards