Analytics library is triggering duplicate event | Community
Skip to main content
Adobe Employee
October 18, 2024
Question

Analytics library is triggering duplicate event

  • October 18, 2024
  • 1 reply
  • 827 views

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, };

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 18, 2024

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!
Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 19, 2024

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.

Jagpreet_Singh_
Community Manager
Community Manager
October 21, 2024

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!

Jagpreet Singh