Don't send event if the eVarX value is the same as last time | Adobe Higher Education
Skip to main content
Level 4
July 19, 2021
Beantwoord

Don't send event if the eVarX value is the same as last time

  • July 19, 2021
  • 1 reactie
  • 2029 Bekeken

Hey Community.
I'm currently looking for a look alike of getValOnce functionality.

Context: 
When my users are processing an internal search, an event1 is being triggered once he land on search page results. If the user click on a product page, and then go back to the search page results the event1 will be trigger again.


My question is the following:
Is there any way to not send an event (here the event1) a second time if the keyword (eVarX) value hasn't changed since last time?

 

Thanks a lot for your help here.

Er kunnen geen reacties meer worden geplaatst op dit onderwerp.
Beste antwoord door yuhuisg

You could set a flag in sessionStorage or localStorage when event1 occurs. Then, you can read that back with a data element as a condition for whether you want to track event1 again.

1 reactie

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAntwoord
Community Advisor
July 20, 2021

You could set a flag in sessionStorage or localStorage when event1 occurs. Then, you can read that back with a data element as a condition for whether you want to track event1 again.

Swanan_Auteur
Level 4
July 20, 2021
Hey Yushuisg,