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

Detect component name after user interaction

Avatar

Avatar
Boost 1
Level 1
Stochino
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
Stochino
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

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

26-03-2021

Hi all,

I'm using Adobe AEM 6.5 and I'm looking for a solution to my problem.

All I need is that when an user clicks on an html portion (a button, an input etc.), I have to be able to understand which component that portion belongs to. Is there an OOB way to detect the component name after an user interaction (e.g. a click)?

Otherwise, I was thinking to customize the html related to every component by adding an extra html line with helpful infos in order to detect the component name with javascript. By the way I wonder if is there a way to add this extra line once for all component, avoiding to customize every html file.

 

Has anyone had the same need? Please help me, I've been thinking about a solution for weeks.

click component html Interaction
View Entire Topic

Avatar

Avatar
Validate 1
Level 7
KiranVedantam1992
Level 7

Likes

161 likes

Total Posts

159 posts

Correct Reply

48 solutions
Top badges earned
Validate 1
Establish
Give Back 3
Give Back
Boost 50
View profile

Avatar
Validate 1
Level 7
KiranVedantam1992
Level 7

Likes

161 likes

Total Posts

159 posts

Correct Reply

48 solutions
Top badges earned
Validate 1
Establish
Give Back 3
Give Back
Boost 50
View profile
KiranVedantam1992
Level 7

26-03-2021

Hi @Stochino,

 

For this, I don't think there is anything OOTB. You can customize it like below:

  1. Create a tracking component
  2. Add it [via data-sly-resource] to all the component
  3. Add a specific data variable [like parent component name] in each component and track it on any action via this tracking component

Hope this helps.

 

Thanks,

Kiran Vedantam.