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
BedrockMission!

Learn More

View all

Sign in to view all badges

Adobe Launch success events counts will accumulate

Avatar

Avatar
Validate 1
Level 1
DebbyNPL
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
DebbyNPL
Level 1

Likes

0 likes

Total Posts

8 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
DebbyNPL
Level 1

17-05-2021

If I have many events/or 1 click event click for more than 1 times on the same page,the event counts will be accumulate

Such as if I click a button (event10) 3 times,I want it to be the first time: event10=1 the second time: event 10=1 the third time event10=1, totally 3 times.

However it showed as the first time: event10=1 the second time: event 10=2 the third time event10=3, totally 6 events were recorded/send.

 

A similar situation also happened in different button clicks on one page.

 

If I clear variables after sending beacon, the other useful eVars and Props will be all clear (I have more than 50 eVars/props so It will be a huge work for me to reset the other variable after clear variable), so how can I just celar the variables of the event10 or let it not accumulate.

event

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Publish 1
MVP
yuhuisg
MVP

Likes

180 likes

Total Posts

541 posts

Correct Reply

106 solutions
Top badges earned
Publish 1
Affirm 100
Springboard
Bedrock
Validate 1
View profile

Avatar
Publish 1
MVP
yuhuisg
MVP

Likes

180 likes

Total Posts

541 posts

Correct Reply

106 solutions
Top badges earned
Publish 1
Affirm 100
Springboard
Bedrock
Validate 1
View profile
yuhuisg
MVP

18-05-2021

You can use 

s.registerPostTrackCallback(function(){
  s.events = "";
});

to clear all of your s.events after each beacon call (hit) to AA.

Avatar

Avatar
Boost 3
Level 1
tim_funk
Level 1

Likes

3 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Boost 3
Contributor
Applaud 5
Shape 1
Boost 1
View profile

Avatar
Boost 3
Level 1
tim_funk
Level 1

Likes

3 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Boost 3
Contributor
Applaud 5
Shape 1
Boost 1
View profile
tim_funk
Level 1

18-05-2021

If you remain on the page to allow subsequent events trigger, you need to clearVars after each beacon send otherwise each event will have all the variables included from before (or at least the ones not overridden)

 

So adding the clear variables rule after the beacon fire is the way to go. If you have a lot of rules (and depending on your setup) - this can be annoying (it was for me).

 

Luckily - There is a nuclear approach to fix this. Adobe analytics allows for a hook to fire after the beacon is sent. So you can create a hook (code follows next) to clear vars after the beacon is sent. Then this is done universally on the property and you don't need to worry about it anymore. Place this code either as a piece of custom code in the analytics extension, or as a new rule that fires ONCE before any beacons are sent.

 

s.registerPostTrackCallback(function(){
  s.clearVars();
});

 

I also submitted a RFE so we can avoid pasting in code since (I believe) this is a common use case

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/adobe-analytics-ex...

Avatar

Avatar
Contributor
Level 3
jkm-disco
Level 3

Likes

22 likes

Total Posts

124 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back
Affirm 10
Applaud 25
View profile

Avatar
Contributor
Level 3
jkm-disco
Level 3

Likes

22 likes

Total Posts

124 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back
Affirm 10
Applaud 25
View profile
jkm-disco
Level 3

17-05-2021

Hi @DebbyNPL ,

It does sound like clear vars is normally the right way to go, but you have several options if you want the remaining variables to persist:

  1. Explicitly unset the event in custom code. E.g. Using yuhuisg's code to unset all events.
  2. Set the event/fire beacon in custom code using variable overrides. This is personally my favorite technique to send data only relevant to click tracking that I don't want persisting after a click--event10 in your case.
  3. You could also make sure to set event10 in custom code to make sure you are resetting it as versus incrementing it. This can be dangerous if you are not careful to unset it as it could stay set even if you have other click tracking that wouldn't normally relate to event10.
  4. Create a decoupled, direct call rule to set variables so that it can be reused in multiple places (like pageviews and click tracking) without actually sending a beacon within that rule.

I'm sure there are plenty of other solutions available, but the first and second above are relatively quick and easy to setup.