Skip to content

dataLayer loads after Google Tag Manager script so dataLayer values are not available to page_view event #1133

@ericras

Description

@ericras

I think technically this being at the bottom works but being in the footer does make using the datalayer much more complicated. The values aren't available for early hooks meaning if you're trying to pass them to something like the page view event they aren't available.

Additionally, since they only push the values on, not triggering any events, there isn't a way to trigger pushing any values into a tag.

It seems like it would cause fewer problems for developers if it was in the header somewhere. even better if it could go before tag manager.

https://www.drupal.org/project/datalayer/issues/3396490#comment-15727184

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions