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

SOLVED

DTM - Click Events

alex_fong
Level 1
Level 1

Hi,

I'm quite new to DTM and Omniture and am trying to figure out how to dynamically set the "link name" for a click event within DTM. Ideally I would like to append the ID of the clicked element onto the end of the page name e.g.:

s.tl(this,'o', s.pageName + ' | ' + this.id,null,'navigate');

Is there a way to do this within DTM?

Alex

1 Accepted Solution
Ben_Bytheway
Correct answer by
Employee
Employee

Hi Alex,

You can do this in DTM by first creating an Analytics Tool.  Once you have done that, you would go to the rules section and creating a new event based rule, selecting s.tl() for your tracking call in the Adobe Analytics section and filling out the conditions section.

[img]Capture2.PNG[/img]

In the Link Name text box, you would could do one of a few things for the name of the link.  Assuming that your pageName is either generated or retrieved with a data element called "pageName", you could do one of these:

  1. %pageName%|%event.currentTarget.getAttribute(id)%
  2. or %pageName%|%target.getAttribute(id)%

The sections surrounded by % should be replaced by the dynamic values.

Hope that helps or at least gets you on your way.  🙂

Thanks,

Ben

View solution in original post

2 Replies
Ben_Bytheway
Correct answer by
Employee
Employee

Hi Alex,

You can do this in DTM by first creating an Analytics Tool.  Once you have done that, you would go to the rules section and creating a new event based rule, selecting s.tl() for your tracking call in the Adobe Analytics section and filling out the conditions section.

[img]Capture2.PNG[/img]

In the Link Name text box, you would could do one of a few things for the name of the link.  Assuming that your pageName is either generated or retrieved with a data element called "pageName", you could do one of these:

  1. %pageName%|%event.currentTarget.getAttribute(id)%
  2. or %pageName%|%target.getAttribute(id)%

The sections surrounded by % should be replaced by the dynamic values.

Hope that helps or at least gets you on your way.  🙂

Thanks,

Ben

View solution in original post

alex_fong
Level 1
Level 1

Thanks Ben - #2 worked like a charm. I appreciate the help!