-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order of events being added to the adobeDataLayer array. #142
Comments
This is indeed the case because the pushed items are processed first before they are pushed to the underlying array. While reading the code I also mentioned that the [ Ideally the procedure is reversed the following way:
|
@adobe export issue to Jira project SITES as Bug |
1 similar comment
@adobe export issue to Jira project SITES as Bug |
❌ Cannot export the issue. GitHub repo adobe/adobe-client-data-layer is not supported in JIRA project SITES and type Bug. |
@adobe export issue to Jira project SITES as Bug |
❌ Cannot export the issue. GitHub repo adobe/adobe-client-data-layer is not supported in JIRA project SITES and type Bug. |
@adobe export issue to Jira project SITES as Bug |
❌ You don't have permission to export this issue. |
@adobe export issue to Jira project SITES as Bug |
✅ Jira issue SITES-7944 is successfully created for this GitHub issue. |
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:
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: