Custom JavaScript (Button Tracking + Event) in DTM

Avatar

Avatar
Validate 1
Level 1
kishoremcp
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
kishoremcp
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

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

17-11-2015

I have the below custom JavaScript function to track a button.

I am new to DTM and want to tag the button name in to variables 60 and want to fire an event 35 when that button is clicked. 

Is this possible in DTM? IF so, please help me (I am very new to DTM)

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

22-11-2015

Hi Kishore , 

Thanks for reaching out to Adobe community.

For the use case described above , we can track the button click by writing the custom javascript code in the event rule. You can use the following link to setup the Event based rule for button click  https://marketing.adobe.com/resources/help/en_US/dtm/rules_event.html and can use the below custom code in custom code section.

Var button_name= this.getAttribute( "name");
s.linkTackVars="prop60,eVar60,events";
s.linkTrackEvents="event35";
s.prop60=button_name;
s.eVar60=prop60;
s.events="event35";

Please feel free to reach out to us in case of any queries.

Thanks & Regards

Parit Mittal

Answers (4)

Answers (4)

Avatar

Avatar
Level 1
satish724
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
satish724
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile
satish724
Level 1

16-01-2019

Hi Pari,

I stumbled upon this very old thread and would like some help from your side. Could you please guide me? I want to track button clicks on my e-commerce website.

Avatar

Avatar
Level 1
satish724
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
satish724
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
View profile
satish724
Level 1

16-01-2019

Hi Guys,

I'm pretty much used to GA and GTM and I'm completely new to Adobe Launch. I'm looking to track buttons on my e-commerce website. Could someone please suggest what Rules, Events, Data Elements & Variables I should be using?

Avatar

Avatar
Validate 1
Level 1
kishoremcp
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
kishoremcp
Level 1

Likes

0 likes

Total Posts

5 posts

Correct reply

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

20-11-2015

This is not related to Analytics or Target. 

This is related to Adobe Analytics Implementation. If i am at the wrong place, please guide me to the right direction.

Thanks.

Avatar

Avatar
Give Back 25
Employee
shekhardhiman
Employee

Likes

51 likes

Total Posts

688 posts

Correct reply

330 solutions
Top badges earned
Give Back 25
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Give Back 25
Employee
shekhardhiman
Employee

Likes

51 likes

Total Posts

688 posts

Correct reply

330 solutions
Top badges earned
Give Back 25
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
shekhardhiman
Employee

18-11-2015

Hi There,

Thanks for reaching out.

This looks more specific to Adobe Analytics implementation using DTM. Is it specific to Analytics or Target?

Thanks!