Skip to content
Help Center
  • Pricing
  • ProductsExpand
    • Premium BundlesGet all the tools you need in one bundle
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
  • AI Starter Templates
  • Blog
  • SupportExpand
    • Help CenterProduct Questions? Not sure how to do something? Start here
    • Support TicketsNeed help? We love to help our customers
    • About usCrafted with love in Missoula, Montana
    • Contact usPre Sale Questions? Need help purchasing?
Account Account
Get Kadence
Kadence Theme
  • Features
  • Pro
  • Starter Templates
  • HelpExpand
    • Documentation
    • Facebook Group
    • Submit a Ticket
    • Feature Requests
    • Roadmap
    • Changelog
Help Center
Kadence Theme

Kadence Theme

  • Create a Full Screen Landing Page

Getting Started

  • Theme Installation
  • Getting Started with a Classic Starter Template

Customize Settings

  • How to customize the Kadence Footer
  • Responsive Breakpoints in Kadence
  • How to Import, Export, and Reset Kadence Theme Customizer Settings Using Starter Templates Plugin
  • How to use the Kadence Theme Color Palette
  • Typography and setting font sizes for different devices
  • How to setup Page/Post settings
  • How to Add a Sidebar
  • Sticky Sidebars
  • How to style Buttons
  • How to add Scroll To Top

Header

  • How to Customize the Kadence Header
  • Customizing the Mobile Navigation Area
  • How to Use a Transparent Header
  • Customizing the Topbar
  • Navigation Colors (Transparent Header, Sticky Header)
  • Edit Dropdown Menu Styling
  • Working with the Sticky Header
  • Social Media Icons in the Header
  • Editing a Row in the Header

General WordPress

  • Set Site Favicon
  • How do I add Custom CSS
  • Adding Google Analytics
  • How to backup my site?
  • How to add a Custom Post Type
  • Fix: Page Not Updating
  • How to Find the Page or Post ID
  • How to prevent spam comments
  • How do I turn off comments?
  • How to Remove All Spam Comments

Troubleshooting

  • Troubleshooting the “Update Failed: Service Unavailable” error when updating Pro Kadence WP plugins
  • How to Enable the WordPress Error Logs
  • WordPress Error “Incompatible Archive”
  • Temporarily deactivating plugins
  • How to View Console Log Errors
  • Clearing Your Website Cache
  • How to preview the mobile version of your site on Desktop
  • Getting 500 error
  • Broken Styles after version 1.1.15

Advanced

  • Common Code Snippets for Kadence Users
  • How to translate using LocoTranslate
  • How to hook elements inside of post or page content
  • What Is a Child Theme, Should I install one, if so How?
  • How to add a custom filter or function with Code Snippets
  • Adding Custom Fonts to Kadence
  • How to make a custom 404 page
  • How to change a theme icon to something custom
  • Change any text on your site
  • Changing Various Heading HTML Tags
  • Adding Google Tag Manager with a child theme or code snippet plugin
  • Replace Author HTML (Multiple Author Support)
  • Theme hooks

Pro Addon

  • Kadence Maintenance Mode
  • WooCommerce Addons
  • How to Display Custom Post Types with Kadence Elements Templates and the Post/Grid Carousel
  • How to use conditional header
  • Theme hooks
  • Kadence Theme Pro Plugin
  • Header Addons
  • How to create a Mega (multicolumn menu)
  • How to add contact information
  • How to add a toggle open menu for desktop
  • How to use the Color Palette Switch (Dark Mode)
  • How to add a login and account Menu
  • Kadence Custom Fonts
  • How to add scripts in header/footer
  • How to open the side cart when a product is added to cart
  • How to use Element Hooks

Kadence Elements

  • What is Kadence Elements?
  • Installing Kadence Elements
  • The Four Types of Kadence Elements
  • Switching between different Kadence Elements Types
  • Showing/Hiding Kadence Elements Settings
  • How to Create a Kadence Elements Content Section
  • Creating a Template Element
  • What goes into an element?
  • How to Replace the Footer Using a Kadence Element
  • How to Use an Element to Replace the Archive Loop Item Content
  • How to Design a Post Grid/Carousel using a Kadence Element

Woocommerce

  • How to Add Image Switch on Hover for Product Archives
  • How to Add a Mini Cart to the Site Header
  • How to Change the WooCommerce Product Loop Title Tags
  • Home
  • Knowledge Base
  • Kadence Theme
  • Kadence Theme
  • Advanced

Adding Google Tag Manager with a child theme or code snippet plugin

There are a number of ways to add Google Tag Manager code to your WordPress website. If you are using Kadence Pro, you can easily add your Google Tag Manager code snippets to your WordPress site using the WordPress Customizer. We’ve got a blog post overview of how to do that available. It’s just one of many reasons that you might consider getting a Kadence Bundle. 

If you don’t have Kadence Pro, however, it’s still easy to add Google Tag Manager code snippets to your WordPress site. These methods include using a Child Theme and editing the theme files or using a plugin.

Why should you use Google Tag Manager?

There are a number of reasons why you might want to use Google Tag Manager. Google explains the benefits themselves here. In short, Google Tag Manager gives you the ability to do much more with understanding your audience and how they use your site. You gain the capability to add and update your own tags for conversion tracking, site analytics, remarketing. You can even add specific events that, when they are triggered by a user, specific information is added to your analytics so you can better understand your audience. 

It also means that when you add, update, or remove any of this tracking, you don’t need to change anything on your site. All of the changes occur on your Google Tag Manager account, and they even keep a record of all of the changes you make, so that you can easily revert changes or see quickly what changes happened when. This additional version control is something you just can’t see unless you are managing your site code with a repository like GitHub. Google Tag Manager has a number of benefits, and we highly recommend using it to manage your analytics and other marketing initiatives.  

Using a plugin to add Google Tag Manager to your site 

For many people who don’t want to look under the hood of WordPress, a plugin to add code snippets is the easiest way to get the same functionality, including adding Google Tag Manager code to your site. There are a number of plugins that will do this for you. 

Google Site Kit. Google Site Kit adds quite a bit of functionality to your WordPress site including the ability to add your Google Tag Manager code. 

Google Analytics and Google Tag Manager Plugin. This very simple plugin helps you add your Google Tag Manager code to your site without a lot of fanfare or extra bloat. Simple and easy to use. 

Flying Analytics. This is another easy to use plugin that helps you add your Google Tag Manager codes to your site without much extra functionality. 

Using a Child Theme

If you don’t want to use a plugin or don’t have Kadence Pro to quickly add your Google Tag Manager code to your site, a child theme is an option. This might make the most sense if you already have a child theme in place for other reasons. 

Our suggestion would be to add hooks to the top of your page  using the built-in WordPress hooks to ensure your Google Tag Manager code is added to the head tag just after the opening body tag. You can do so by adding functions to your child theme functions.php file. Using the code below, add your GTM codes below the commented line to start using Google Tag Manager for your WordPress site.

<?php
/**
 * Add google tag manager code in head tag.
 */
function custom_add_gtm_code() {
?>
<!--  Add your GTM Code below this line -->

<?php
}
add_action( 'wp_head', 'custom_add_gtm_code' );

/**
 * Add google tag manager noscript just after opening body tag.
 */
function custom_add_gtm_code_noscript() {
?>
<!--  Add your GTM noscript Code below this line -->

<?php
}
add_action( 'wp_body_open', 'custom_add_gtm_code_noscript' );
Changing Various Heading HTML TagsReplace Author HTML (Multiple Author Support)
  • Pricing
  • Products
    • Premium BundlesGet all the tools you need in one bundle
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
  • AI Starter Templates
  • Blog
  • Support
    • Help CenterProduct Questions? Not sure how to do something? Start here
    • Support TicketsNeed help? We love to help our customers
    • About usCrafted with love in Missoula, Montana
    • Contact usPre Sale Questions? Need help purchasing?
Account Login
  • Features
  • Pro
  • Starter Templates
  • HelpExpand
    • Documentation
    • Facebook Group
    • Submit a Ticket
    • Feature Requests
    • Roadmap
    • Changelog