• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Adding Google Tag Manager Through Functions

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding Google Tag Manager Through Functions

This topic is: resolved

Tagged: Altitude Pro, google tag manager

  • This topic has 1 reply, 2 voices, and was last updated 3 years, 8 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • June 6, 2019 at 6:17 am #491504
    BlakeN
    Participant

    I'm wanting to implement Google tag manager and know how to correctly set everything up but am not sure how to best get the tracking code placed in top of the header and top of the body of every page.

    The Genesis header and footer scripts outputs put them at the bottom rather than top and I've been seeing where this can cause some issues.

    Header Scripts
    This code will output immediately before the closing </head> tag in the document source.
    Footer Scripts
    This code will output immediately before the closing </body> tag in the document source.

    https://developers.google.com/tag-manager/quickstart elaborates on where to place.

    The only way I believe to drop the code on every page of the site is through Functions.php but I'm unsure of how to implement.

    Any help is greatly appreciated.

    I'm using Altitude Pro Theme

    https://hubtap.com
    June 6, 2019 at 5:15 pm #491515
    Brad Dalton
    Participant

    You could load the js using any genesis hook


    Get Help – Book Consultation.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Adding Google Tag Manager Through Functions’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble