Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!

Analytics library is triggering duplicate event

Avatar

Employee

Hi all. I have an issue where the Launch is triggering a call event when refreshing the page. I want to control the way i send the events and this is causing duplicate page views. Any idea of such a setting? It seems like pageLoadAbort and controlPageLoad is not working. 

window.marketingtech = {
  adobe: {
    launch: {
      url: process.env.LAUNCH_URL,
      controlPageLoad: true,
      pageLoadAbort: true,
    },
    alloy: {
      edgeConfigId: process.env.LAUNCH_EDGE_CONFIG_ID,
    },
    target: true,
    audienceManager: true,
  },
  sophia: false,
};

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Community Advisor

Hi @EmilBo1 

not sure where the config is being used, Also, it would be helpful to understand your Launch setup better meaning

  • how/where is the page view rule triggered?
  • are there potential other rules that could cause the duplicate page view?

I mean you could always (if not in a SPA context) add a condition with "Max Frequency" set to 1 Page view, but this would rather be fighting the symptoms and not the root cause.

Cheers from Switzerland!


Avatar

Community Advisor and Adobe Champion

I agree with @bjoern__koth; rather than trying to "cancel" the call, I would be looking into why the rules are triggering twice.

 

Keep in mind, if you rule has multiple triggers (i.e. Window Loaded, History Change, etc) they can all run. To prevent that, the Max Frequency condition is a must.... if there are two different rules, that becomes harder.. you need make sure different rules aren't triggering for the same refresh... or find a way to merge the rules so that you can apply the condition we already talked about.

 

Regardless of using AppMeasurement.js or Alloy.js, you should be using the Satellite Debugger to understand what rules are firing.

 

// Turn on Debugger in your console
_satellite.setDebug(true);

// Turn off Debugger in your console
_satellite.setDebug(false);

 

 

You should be able to see if one rule is being triggered multiple times, or if there are multiple rules being triggered.

Avatar

Administrator

Hi @EmilBo1 Did you find the suggestions helpful? Let us know if you need any further information! If the solution works for you, please mark the answer as correct to help others. And if you’ve found your own solution, we’d love for you to share it with the community. Thank you!