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

TrackEvent get parameters from selected element

lonestarspock
Level 2
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
skandg43264764
Level 4
Level 4

@lonestarspock 

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