Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
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