- last update
about 1 year ago 14 pass - πΊπ¦Ukraine tibezh
I think that we need to have it in the footer to initialize after other scripts (i.n. GTM).
I've attached a patch with changes.
- πΊπΈUnited States eojthebrave Minneapolis, MN
According to Google's documentation (https://developers.google.com/tag-platform/tag-manager/datalayer) the dataLayer variable should be initialized before the GTM code. What issues are you running into that moving it to the footer helps solve?
- πΊπ¦Ukraine tibezh
@eojthebrave here we have 2 terms: "initialized" and "items are added".
If we're using GTM, then "initialized" is already available, but the event should be added after GTM init.