Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

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

Avatar

Level 3

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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.