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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Once per click event persisting in Adobe Launch

Avatar

Level 1

When I'm clicking a certain onclick (for example: on "Featured Offers/Pricing&Incentives" tab) at first click "Event" is getting passed which I want but the issue is that it is Firing an unwanted "Event" parameter when visiting the second/more times which I do not want. 

 

So, what is the script in Adobe Launch that I should use to prevent unwanted 'Event" from firing when clicked Second or multiple times?

 

Thanks for your help!

P!

 

4 Replies

Avatar

Community Advisor

I assume you are referring to a success event in Adobe (i.e. s.events = "event1")

 

You can change the settings right in the admin panel:

Jennifer_Dungan_0-1663798372796.png

 

 

But default, events are set to "Always Record Event"... but you can change this to "Record Once Per Visit" (which sounds like what you want); or you can serialize it... but note, that serialization you need to pass a unique id (20 digit alphanumeric) value into the event (i.e. s.events = "event1:2334zdsf353d").. in this case only the first ever instance of "2334zdsf353d" will track, and subsequent event1 passing "2334zdsf353d" will be ignored (this is good for purchases with reference ids).

 

However, this will only prevent the event from tracking... it won't stop the entire tracking call... which may be what you are looking for...

 

In that case, I would likely write a session cookie or session storage value on the first click... IF that session object exists, then don't trigger the tracking call at all.

 

You could build the check right into the conditions on your click rule.

Avatar

Level 1

Hi Jennifer, 

 

Thanks for the help. Let me explain it again: So, when the user clicks on a specific tab one time, I'm passing the below configurations.

  • Events: event43, event9
  • eVar1: ABC
  • evar2: XYZ

So, "Events" and "evar2" parameters should not fire clicking in the same tab when visiting second/more times. But these values are persisting on the second click as well which I clearly don't want. 

 

So, I have used a cache clear script: 

emptyVars();
_satellite.logger.log('empyVars fired');

 

After this, the above values are like below:

  • Events: event43, event9
  • eVar1: ABC

Here, eVar2  has now gone which is good but the "events" is still there which I don't want. So, How to make this event go from here?

 

Thanks!

p!

Avatar

Level 5

Another common situation for repeating and unwanted event tracking is the subsequent tracking on the same page.

You send out one event (say event1) on a user interaction which is correct. When the user performs another action on the same page and you send another event (say event2), the event1 is sent again with the event2 as well, as you didn't clear the Adobe Analytics object variable after the first event1 sent.

As the Adobe Analytics object, _satellite, is a page level object, once you assign event1 to the object for sending data, that event1 persist until cleared, or user navigated to another page where the _satellite object is recreated.

This problem is more serious on single-page-application as it is technically just one single page for the entire application/web.

My usual practice is using the Adobe Analytics extension "Clear Variables" action every time I sent a beacon.

 

Avatar

Community Advisor

Since you're using Adobe Launch, you can add a Max Frequency condition to your rule to trigger it as many times as you need.