Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Analytics Champion Program are open!
SOLVED

Capture s.products set on page in s.trackLinkVars using DTM?

Avatar

Level 2

As the title says, I'm curious to know how you do it? smiley

1 Accepted Solution

Avatar

Correct answer by
Level 3

Garry,

To modify s.linkTrackVars or s.linkTrackEvents in DTM, you can do this via the "Custom Code" editor in the Adobe Analytics section of your rule.  You'll need to keep in mind that the Custom Code editor has its own scope in Javascript, so you'll need to make sure it has the right reference to your s object.

Here's how I'd do what you're trying to do:

[img]Dynamic_Tag_Management__by_Adobe.png[/img]

Hope this helps!

Best,
Shawn

View solution in original post

3 Replies

Avatar

Level 3

Garry,

Setting s.linkTrackVars or s.linkTrackEvents can be accomplished via the "Custom Page Code" editor in the Adobe Analytics section of a rule.  Keep in mind that the Custom Page Code editor has its own Javascript scope, so you need to make sure that the 's' object is available to your code before trying to access it.

Here's how I would do what you're trying to do:

[img]Dynamic_Tag_Management__by_Adobe.png[/img]

Hope this helps!

Best,
Shawn

Avatar

Correct answer by
Level 3

Garry,

To modify s.linkTrackVars or s.linkTrackEvents in DTM, you can do this via the "Custom Code" editor in the Adobe Analytics section of your rule.  You'll need to keep in mind that the Custom Code editor has its own scope in Javascript, so you'll need to make sure it has the right reference to your s object.

Here's how I'd do what you're trying to do:

[img]Dynamic_Tag_Management__by_Adobe.png[/img]

Hope this helps!

Best,
Shawn

Avatar

Level 3

Garry,

Setting s.linkTrackVars or s.linkTrackEvents can be accomplished via the "Custom Page Code" editor in the Adobe Analytics section of a rule.  Keep in mind that the Custom Page Code editor has its own Javascript scope, so you need to make sure that the 's' object is available to your code before trying to access it.

Here's how I would do what you're trying to do:

[img]Dynamic_Tag_Management__by_Adobe.png[/img]

Hope this helps!

Best,
Shawn