Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

DL Event not captured before page unload

Avatar

Level 1

Hi team,

 

We are implementing a new event-driven data layer and I'm using the Data Layer Manager extension to capture the push events in Adobe Data Collection. When the event is a link that leads to a new page (wipes the DOM), I can see the event being added to the data layer before the page unload, but the beacon is not sent every time (can't see the event in the debugger), hence data is not captured every time even if the data layer is updated. It seems like a timing issue since it does work sometimes, just not consistently. 

 

Any idea how to fix this and make sure the data is sent every time before unloading the page and going to the next?

 

Cheers!

Topics

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

2 Replies

Avatar

Community Advisor

@KevLa1 It is possible the rule did not have enough time to fire before the new page loads. Try checking the box within the rule identifier indicating ‘Delay link activation’. A delay keeps the activated link from loading until the rule has fired.

Note: This setting is only effective on actual link, or anchor tags. The setting has no effect on non-traditional attribute types like 'buttons' for example.

Reference: https://helpx.adobe.com/dtm/kb/my-rule-is-firing-inconsistently-why.html

Avatar

Level 5

@KevLa1 To ensure beacons are sent before page unload:

1) Enable sendBeacon() in Adobe Analytics extension settings.
2) Use a Click Event Rule in Launch instead of relying on dataLayer.push() right before navigation.
3) Delay navigation slightly using setTimeout() if pushing data manually.

These steps prevent timing issues and ensure reliable tracking.