You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is seems that the ACDL script is adding events to the adobeDataLayer array only after the callbacks of the events have completed. This leads to an odd ordering of the event entries in the adobeDataLayer array.
Consider the following script:
``{{html
<!doctype html>
1: adobeDataLayer<0> = undefined
1: adobeDataLayer<1> = undefined
2: adobeDataLayer<0> = one
2: adobeDataLayer<1> = undefined
3: adobeDataLayer<0>.event = one
3: adobeDataLayer<1> = two
3: adobeDataLayer<0>.event = one
3: adobeDataLayer<1> = two
It would be expected that the ACDL appends the event object to the adobeDataLayer array prior to calling the callbacks that have been registered to that event, and not after. Because otherwise, notice how the events one and two end up in the reverse order.
The text was updated successfully, but these errors were encountered:
Is seems that the ACDL script is adding events to the
adobeDataLayer
array only after the callbacks of the events have completed. This leads to an odd ordering of the event entries in theadobeDataLayer
array.Consider the following script:
<script src="https://unpkg.com/@adobe/[email protected]/dist/adobe-client-data-layer.min.js" async defer></script> <script> window.adobeDataLayer = window.adobeDataLayer || <];``{{html
<!doctype html>
The resulting log output is:
But the expected output would have been:
It would be expected that the ACDL appends the event object to the
adobeDataLayer
array prior to calling the callbacks that have been registered to that event, and not after. Because otherwise, notice how the eventsone
andtwo
end up in the reverse order.The text was updated successfully, but these errors were encountered: