How can I set up custom code using do_plugins to stop events firing twice

Avatar

Avatar
Validate 1
Level 2
andersonjh
Level 2

Likes

5 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
andersonjh
Level 2

Likes

5 likes

Total Posts

23 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
andersonjh
Level 2

04-04-2020

Our shopping cart has a number of popups that, after selected, cause the page to refresh and the scView or Checkout event to reload again. For this reason, in the 5 years we've had Adobe (I'm new so not my fault haha), they've never created a path for the 6 page shopping cart. 

 

I tried to use this code to limit the shopping cart view page to once per visit or session with this:

 

s.usePlugins = true;
s.doPlugins = function() {
s.events="scView,event52";
s.events = s.getValOnce(s.events,"event52,scView")
};

 

What am I doing wrong or is there a better way?

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Shape 25
MVP
Andrey_Osadchuk
MVP

Likes

537 likes

Total Posts

968 posts

Correct reply

263 solutions
Top badges earned
Shape 25
Bedrock
Coach
Boost 500
Affirm 250
View profile

Avatar
Shape 25
MVP
Andrey_Osadchuk
MVP

Likes

537 likes

Total Posts

968 posts

Correct reply

263 solutions
Top badges earned
Shape 25
Bedrock
Coach
Boost 500
Affirm 250
View profile
Andrey_Osadchuk
MVP

05-04-2020

Hi Anderson,

 

If the goal is to fire the mentioned events once per visit, just update the event settings in the report suite by setting Unique Event Recording to Record Once per Visit.

 

Alternatively, you may want to create an advanced calculated metric for each event to dedupe them by Visit.