Implement Click event in AEP Tags | Community
Skip to main content
August 26, 2024
Question

Implement Click event in AEP Tags

  • August 26, 2024
  • 1 reply
  • 829 views

Hi,

newbie to AEP and core and web SDK extension. I have the following set up.

I want to fire an event (click event) when the user clicks on an anchor tag link and capture the value/innerText of the link. on debugging in the browser console i see that the value i want is at "event.target.childNodes[0].textContent". I want to capture this value and update an element in the schema.

I created a new rule of eventType "click", had the CSS selector too. I had my conditions set up too, with conditionType as "custom code".  in the condition after going through a bunch of If..else statements, i return true . In the action how do i tap into the event and capture the link value to update my schema element? documentation doesn't give any pointers. Do I have to do a websdk send event in action and map my schema element in the data configuration?

i want to capture "event.target.childNodes[0].textContent" and insert into my schema.page.mylink element. can anyone throw some light?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

kautuk_sahni
Community Manager
Community Manager
October 18, 2024

@Ankit_Chaudhary @franzli @jayakrishnaaparthasarathy @Hey_John @Asheesh_Pandey @Jacob-DDdev Curious to hear SMEs perspectives on this question. Do you all mind sharing your thoughts?

Kautuk Sahni