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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Getting a error when using a css selector

nimay50244411
Level 1
Level 1

Within Target Goals and Settings I am trying to select multiple elements with the same class CSS selector and I get an error:
ERROR The element selector entered maps to multiple locations on the page. Not sure why this is an issue?

1 Accepted Solution
surebee
Correct answer by
Employee
Employee

Hi @nimay50244411 ,

Having multiple elements share a selector is typically not good practice, especially when using the VEC. This could cause issues during content delivery and or tracking goals and settings. 

For instance, if you want to change a heading for element A using the VEC and track clicks on element B when both elements share the same CSS selector: Target will not know how to differentiate between the two elements. This is why we recommend using unique IDs for elements that you would like to test or target using Target. See this article for more information.

Let me know if you have any questions!

View solution in original post

2 Replies
surebee
Correct answer by
Employee
Employee

Hi @nimay50244411 ,

Having multiple elements share a selector is typically not good practice, especially when using the VEC. This could cause issues during content delivery and or tracking goals and settings. 

For instance, if you want to change a heading for element A using the VEC and track clicks on element B when both elements share the same CSS selector: Target will not know how to differentiate between the two elements. This is why we recommend using unique IDs for elements that you would like to test or target using Target. See this article for more information.

Let me know if you have any questions!

View solution in original post

karandhawan
Employee
Employee

@nimay50244411 I understand that you are trying to select multiple elements with the same class CSS selector for click tracking.

I would like to confirm that currently, Target VEC does not allow for multiple elements with the same selector to be selected for click tracking.

However, this is already raised as a feature request and this feature is slated to be released in the upcoming releases of Target which would add support in the VEC to allow click tracking on a css selector that matches more than one element in the page.

https://docs.adobe.com/content/help/en/target/using/release-notes/target-release-notes.html

 

Let me know if this helps.

 

Regards,

Karan