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.
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?
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.
class="button black-background white-text green-bold-font-family apple-button">
Could you please assist.
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
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?