Site logo

[Resolved] Up-to-date guide for installation of GTM with Data Layer

Home Forums Support [Resolved] Up-to-date guide for installation of GTM with Data Layer

Home Forums Support Up-to-date guide for installation of GTM with Data Layer

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1245299
    Alex

    Hey,

    I hope you’re all staying safe. I was just looking into replacing a plugin combination that I have with GeneratePress Elements so that it’s easier to manage + keep my install lean.

    Is there an up-to-date guide available for how to handle this as well as the data layer segment of the install using what is now Elements (no longer Hooks)?

    Thanks in advance,

    #1245527
    Leo
    Staff
    Customer Support
    #1245544
    Alex

    Hi Leo, thanks for the response – I don’t see mention of the data layer in that guide though 🙂

    #1245933
    Tom
    Lead Developer
    Lead Developer

    Hey Alex,

    What’s the data layer in this case? Any examples of what you’re trying to do?

    Let me know 🙂

    #1246256
    Alex

    Hey Tom,

    The data layer is the more complex/developer-oriented part of GTM that most people don’t implement and it involves passing things such as WP user data (name, etc) back to GTM so that it can be used as a data layer variable.

    https://developers.google.com/tag-manager/devguide

    #1246922
    Tom
    Lead Developer
    Lead Developer

    You should still just be able to add the javascript to a Hook Element in the wp_head hook.

    Of course, in order to push certain data the elements will need to have onclick events attached to them as their examples show.

    When it comes to the actual <script> element(s), you can just add those to a single wp_head Hook Element and it should be good to go.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.