How can I set up custom code using do_plugins to stop events firing twice | Community
Skip to main content
andersonjh
Level 2
April 5, 2020
Solved

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

  • April 5, 2020
  • 1 reply
  • 2132 views

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?

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 Andrey_Osadchuk

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.

1 reply

Andrey_Osadchuk
Andrey_OsadchukAccepted solution
Level 10
April 5, 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.