In console logs both parent and child component's event is fired but in in sendMetrices call is going twice for any of the event (sometimes both event is fired as expected) | Community
Skip to main content
May 21, 2025
Solved

In console logs both parent and child component's event is fired but in in sendMetrices call is going twice for any of the event (sometimes both event is fired as expected)

  • May 21, 2025
  • 2 replies
  • 439 views

My application is SPA in react ,in both child and parent component we have written sendAnalytics in componentDidMount. method 

 

expected behavior - both the event should fire on page opening or page reload 

 

current behavior - in console logs i can see both the event is getting fired but in omnibug/network tab i can see two request with the same name , its not certain sometime its working as expected , sometime it fired parent component event twice and sometime child component event twice 

 

first two screenshot is for unexpected behavior and 3rd screenshot is for expected behavior 

 

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 Jennifer_Dungan

Yes, I agree, this sounds like an implementation issue.. which can be hard to diagnose without access to the site and to the rules to understand what is happening.

 

Have you also tried to diagnose using the satellite debugger?

 

// Turn on satellite debugger in your console _satellite.setDebug(true); // Turn off satellite debugger in your console _satellite.setDebug(false);

 

This can give you insights into what rules are being triggered and might help you track down what is happening.

2 replies

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 22, 2025

Hi @happyco 

this seems to be a very implementation-specific issue that is hard to Analyse. Sounds like a timing issue though that they might potentially overwrite each other's value if they fire too closely to each other. I would try to add a delay if possible.

 

Also be aware that firing multiple events will impact the bounce rate since every page with more than one page view call os implicitly no longer considered a bounce.

Cheers from Switzerland!
Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
May 24, 2025

Yes, I agree, this sounds like an implementation issue.. which can be hard to diagnose without access to the site and to the rules to understand what is happening.

 

Have you also tried to diagnose using the satellite debugger?

 

// Turn on satellite debugger in your console _satellite.setDebug(true); // Turn off satellite debugger in your console _satellite.setDebug(false);

 

This can give you insights into what rules are being triggered and might help you track down what is happening.