Expand my Community achievements bar.

Ask our product team on how to best grow your experimentation and personalization strategies with Target during our AMA on May 6th!

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

TrackEvent get parameters from selected element

Avatar

Level 2

I want to track clicks on a few elements using a certain CSS selector. Right now, I'm adding a click listener using the JavaScript methods and using a for loop to add the trackEvent call to get parameters from the "my-custom-name" attribute in each selected element. Instead of using the document.querySelectorAll function to get parameters from the "my-custom-name" element attribute, is there a way to get those parameters and send them with the trackEvent call?

1 Reply

Avatar

Employee

@lonestarspock 

It would be more clear if you can show us what exactly are you doing via screenshot or the code itself.