Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

How to trigger a tag after clicking on a button in Adobe Launch

Avatar

Level 4

Hi community,

 

My question might be a bit **bleep**, but I can't find a way to trigger a tag when a user clicks on a specific button on my page.

Case study:

When a user process an internal search on my website, he lands on a result page with 20 products.

By scrolling down to the bottom, he can click on a button "load more articles". This click adds an event in my datalayer with:

- componentID : SearchResults

- eventAction : pagechange

 

When a user click on this button/or when this event is fired in my datalayer, I want to fire a rule to save all the new products loaded.

 

Any solution here?

Thank you

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can try using the "Data Element Changed" event in your Rule.

First, setup a data element for "eventAction".

Then, in your Rule:

  • Add the "Data Element Changed" event and specify your "eventAction" data element.
  • I also suggest that you add a "Value Comparison" condition to check that the "eventAction" data element equals "pagechange".
  • (optional) Add another "Value Comparison" condition to check that "componentID" equals "SearchResults".

Now, when your "eventAction" gets set in digitalData, Launch will detect that this data element has been changed and run your Rule.

Hope that works!

View solution in original post

5 Replies

Avatar

Community Advisor

Triggering based on your data layer's push seems to be the best approach.

What data layer are you using? Is it the "digitalData" one that is just a key-value object? Or a dataLayer like Google Tag Manager's? Or the Adobe Client Data Layer? Something else?

Please provide more info about your data layer, and maybe even the code that runs with that "Load more" click.

Avatar

Level 1

Hello @yuhuisg, I'm using the digitalData one with a key-value object.

jeremiea1262579_0-1643273243615.png

You can see here the array "event" and the event 1 is the one I want to use to trigger my rule.

Thanks for your help

Avatar

Level 4

@yuhuisg The informations provided by @jeremiea1262579 are mine. I was connected on a wrong account.

Avatar

Correct answer by
Community Advisor

You can try using the "Data Element Changed" event in your Rule.

First, setup a data element for "eventAction".

Then, in your Rule:

  • Add the "Data Element Changed" event and specify your "eventAction" data element.
  • I also suggest that you add a "Value Comparison" condition to check that the "eventAction" data element equals "pagechange".
  • (optional) Add another "Value Comparison" condition to check that "componentID" equals "SearchResults".

Now, when your "eventAction" gets set in digitalData, Launch will detect that this data element has been changed and run your Rule.

Hope that works!