Expand my Community achievements bar.

Join us for an upcoming in-person Adobe Target Skill Builders event ~~> We're hosting these live learning opportunities to equip you with the knowledge and skills to leverage Target successfully. Learn more to see if we'll be coming to a city near you!
SOLVED

Tracking CTAs with the same identifier

Avatar

Level 2

I am new to Adobe Target so looking for tips on best way to set up the reporting on my newest activity I am working on. On our product pages, we have a standard CTA button that shows on all the pages. However, for a subset of pages, the label on the button and the place it links to changes. I need to track the clicks for both of those CTAs as different goals but I am running into an issue. Even though the CTAs have different labels and destinations, the identifier is exactly the same. They have the same class and are nested the same exact way on the page. Is there a good way for us to differentiate the two CTAs in the reporting area? 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi @MelissaMa7 

 

Custom Click Tracking: You can implement custom click tracking. This involves attaching event listeners to the buttons and passing additional data when the buttons are clicked. For example, you could pass a custom attribute like data-track-label with distinct values for each button. This way, when a button is clicked, you'll have additional information to differentiate between them in your reporting.

CSS Selector with Parent Context: If the buttons are nested within different parent elements or have unique parent contexts on a subset of pages, you can utilize CSS selectors to target them specifically. For instance, if the buttons have different parent elements on certain pages, you can construct CSS selectors that include the parent context to uniquely identify them.

URL Parameters: If the destination URLs of the buttons are different for the subset of pages, you can track them based on the destination URL. You can append unique URL parameters to the destination URLs of the subset buttons and then track clicks based on these parameters in Adobe Target.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 3

Hi @MelissaMa7 

 

Custom Click Tracking: You can implement custom click tracking. This involves attaching event listeners to the buttons and passing additional data when the buttons are clicked. For example, you could pass a custom attribute like data-track-label with distinct values for each button. This way, when a button is clicked, you'll have additional information to differentiate between them in your reporting.

CSS Selector with Parent Context: If the buttons are nested within different parent elements or have unique parent contexts on a subset of pages, you can utilize CSS selectors to target them specifically. For instance, if the buttons have different parent elements on certain pages, you can construct CSS selectors that include the parent context to uniquely identify them.

URL Parameters: If the destination URLs of the buttons are different for the subset of pages, you can track them based on the destination URL. You can append unique URL parameters to the destination URLs of the subset buttons and then track clicks based on these parameters in Adobe Target.