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

Re: Custom JavaScript (Button Tracking + Event) in DTM

Avatar

Avatar
Engage 1
Level 1
giri3072
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Engage 1
Boost 1
View profile

Avatar
Engage 1
Level 1
giri3072
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Engage 1
Boost 1
View profile
giri3072
Level 1

11-06-2018

Branched from -

ParitMittal

I followed up the above code and i received an error message.

I need to track a button on my hompage which has a class.

Could you please advise how to track the button. I want to use event based rule.

I set up an event as "event3" in the report suite. i need to track this event.

could you please show me how to setup in adobe tag manager as well.

Replies

Avatar

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

337 likes

Total Posts

2,286 posts

Correct Reply

815 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

337 likes

Total Posts

2,286 posts

Correct Reply

815 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile
jantzen_belliston-Adobe
Community Manager

12-06-2018

I've branched your question into it's own since the thread you commented on is fairly old and having your own question will help to receive solutions.

With all that said, can you share the URL of the page with the button you're trying to track?

Avatar

Avatar
Engage 1
Level 1
giri3072
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Engage 1
Boost 1
View profile

Avatar
Engage 1
Level 1
giri3072
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Engage 1
Boost 1
View profile
giri3072
Level 1

14-06-2018

Hi Jantzen,


For some security reasons, i will not be able to publish the name of the website in this blog.

Would you be able to assist me in this instance without knowing the code.

I can provide the code that you are looking for to better understand how it is on the webpage.

<a title="Sample"

   href="https://forums.adobe.com/apple" type="button"

  class="button black-background white-text green-bold-font-family apple-button">

                Sample

            </a>

When the user clicks the "Sample" button on the first page it will then take the user to the page "/apple" . In this instance they have given the type as button but actually used a "href". In the past i have worked only with the javascript function for the button to click using "onclick" i am little confused in this instance how to use an event tag to fire when the button is been clicked.

Could you please assist.

Thanks

Giri

Avatar

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

337 likes

Total Posts

2,286 posts

Correct Reply

815 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

337 likes

Total Posts

2,286 posts

Correct Reply

815 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile
jantzen_belliston-Adobe
Community Manager

14-06-2018

You should be able to create a event based rule that utilizes the click event and limits it's scope to that class. After you've gotten the rule firing correctly, you can set whatever variable and events you'd like.

Here is an article from one of our evangelists that shows how to do something similar to what you're trying - Getting Started with DTM: CSS Selectors | Adobe Blog

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

04-02-2019

Hi,

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 you please suggest what Rules, Events, Data Elements & Variables I should be using?