adobe / reactor-extension-googledatalayer

Extension for Adobe Experience Platform Tags that enables management of a Google data layer.
https://experienceleague.adobe.com/docs/experience-platform/tags/extensions/adobe/google-data-layer/overview.html
Apache License 2.0
4 stars 5 forks source link

Bug: Initial DL events not caught in Rules #14

Closed brobatr closed 2 years ago

brobatr commented 2 years ago

@ogillies please check and add any detail. I will be able to work on this from 14.08

Expected Behaviour

Tags rules can catch all events in DL history on instantiation.

Actual Behaviour

Some events are not caught. Assumption is that the Tags listeners are not created quickly enough to catch the DL instantiation.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

ogillies commented 2 years ago

Thanks @brobatr

Steps to reproduce:

Using the extension I have a tag library with 2 rules, each listening for a specific event (sfmcCollectLoaded, ecommerceDetail) - the rule action just logs to the console. The ecommerceDetail event is consistently skipped.

image

If I remove the extension and deploy the GTM Helper library using a custom code rule on window loaded and a direct call in the listener all events are consistently caught and both rules fire:

image

brobatr commented 2 years ago

solved my moving the helper instantiation after the listener is created