How to trigger a tag after clicking on a button in Adobe Launch | Community
Skip to main content
Level 4
January 26, 2022
Solved

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

  • January 26, 2022
  • 1 reply
  • 2694 views

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

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

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!

1 reply

yuhuisg
Community Advisor
Community Advisor
January 27, 2022

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.

January 27, 2022

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

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

Swanan_Author
Level 4
January 27, 2022

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