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

Getting a error when using a css selector

Avatar

Avatar
Boost 1
Level 1
nimay50244411
Level 1

Like

1 like

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
nimay50244411
Level 1

Like

1 like

Total Posts

1 post

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
nimay50244411
Level 1

10-08-2020

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?

Error multiple class

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
surebee
Employee

Likes

69 likes

Total Posts

83 posts

Correct Reply

21 solutions
Top badges earned
Coach
Contributor
Shape 1
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
surebee
Employee

Likes

69 likes

Total Posts

83 posts

Correct Reply

21 solutions
Top badges earned
Coach
Contributor
Shape 1
Give Back 5
Give Back 3
View profile
surebee
Employee

11-08-2020

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!

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 10
Level 3
karandhawan
Level 3

Likes

35 likes

Total Posts

41 posts

Correct Reply

10 solutions
Top badges earned
Affirm 10
Give Back
Boost 5
Boost 3
Boost 25
View profile

Avatar
Affirm 10
Level 3
karandhawan
Level 3

Likes

35 likes

Total Posts

41 posts

Correct Reply

10 solutions
Top badges earned
Affirm 10
Give Back
Boost 5
Boost 3
Boost 25
View profile
karandhawan
Level 3

26-08-2020

@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