DTM: Tracking onclick events

Avatar

Avatar
Validate 1
Level 1
brian_andrews1
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
brian_andrews1
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
brian_andrews1
Level 1

15-10-2015

 Hi,

Can someone please help me with a Dynamic Tag Management problem?  I am looking for the proper configuration of event based rule conditions to capture the click on an anchor tag whose only unique property value is for an onclick attribute.

Example below:

<a href="javascript:;" onclick="processlink('http://mywebsite.com/docs/download/2015/04/aab394e4-1f7c-0010-82c7-eda71af511fa.pdf',true,false)"><span>Get the map</span></a>

 

The most obvious method of manually assigning properties and attributes for onclick = does not seem to work.

 


Thanks in advance,

Brian

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Employee
Rudi_Shumpert
Employee

Likes

8 likes

Total Posts

64 posts

Correct reply

24 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile

Avatar
Boost 5
Employee
Rudi_Shumpert
Employee

Likes

8 likes

Total Posts

64 posts

Correct reply

24 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile
Rudi_Shumpert
Employee

15-10-2015

I've added a screenshot here.  In an event based rule you set the event to "click" and then the tag to "a" with the innerText attribute of the "Get the Map".   Then you would put the 3rd party JS in the section down below in the rule.

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 1
brian_andrews1
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
brian_andrews1
Level 1

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
brian_andrews1
Level 1

15-10-2015

Rudi,


Can you elaborate more on how to have DTM search and fire 3rd party javascript for "Get the map"?

 

Thank you.

Avatar

Avatar
Boost 5
Employee
Rudi_Shumpert
Employee

Likes

8 likes

Total Posts

64 posts

Correct reply

24 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile

Avatar
Boost 5
Employee
Rudi_Shumpert
Employee

Likes

8 likes

Total Posts

64 posts

Correct reply

24 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 5
View profile
Rudi_Shumpert
Employee

15-10-2015

you could check the innerHTML value.  or inner text to search for "Get the map"