Adding Google Tag Manager to Your Site

Kayla M.

calendar_month Updated

Kajabi Analytics offers essential data to help you run your online business. However, you can deepen your insight into your site performance, conversion rates, and more by adding Google Tag Manager code to your site.

Warning:
Introducing custom code to your site can open you up to vulnerabilities and potential malware attacks. We recommend using vulnerability tools like VirusTotal or Snyk to scan any custom code that you intend to use and apply certain best practices to help reduce potential impact.

In this article:


Google Tag Manager (GTM)

Google Tag Manager is a tracking tag management solution offered by Google that simplifies tracking tag implementation for marketers, analysts, and developers.

Google Tags are typically used to track web page activity alongside Google Analytics to gain a better understanding of your site's performance and user activity.

When you create a Google Tag Manager account, you'll be provided with two snippets of code unique to your site: one to place in the Head section of your site code, and a second to place in the Body section. In this guide, we'll walk through where to paste each code snippet.

Learn more about Google Tag Manager.

Kajabi also helps you track data with Google Analytics via a Google Analytics integration built into your Site Settings. Learn to connect Google Analytics for more details.


Add GTM code to your Site Settings

Learn to add Google Tag Manager (GTM) code to your Kajabi site.

Step 1. Create a Google Tag Manager account

First, create a Google Tag Manager account.

Step 2. Copy your GTM code

After creating a Google Tag Manager account, you are given a unique code to install GTM onto your site.

Warning:
The sample code used as an example in this tutorial will not work for your site. You must copy and paste the unique code for your own site out of your Google Tag Manager account. This code will be provided to you when you create your account in Step 1.

Copy the first snippet of code provided in your GTM account (not the sample code shown below):

977E6280-60DF-4C87-85BF-90AD96A02E20.png

Step 3. Paste your GTM code into your page scripts

Navigate to your Kajabi account to paste the GTM code snippet in your site Page Scripts.

  • Open the Settings tab from your Dashboard.
  • Click Site Details.
  • Navigate to Page Scripts.
  • Paste your GTM code into your Header Page Scripts.
  • Click Save to keep your changes:


Add GTM code to individual pages

Learn to add your Google Tag Manager (GTM) code to specific pages on your site built with the Encore Template (note: Encore is the current default page template for Kajabi Pages).

With the Encore Template you get access to Kajabi's latest, highly customizable page editing features. Learn more about building your page with Kajabi Pages. 

Note:
Your Google Tag Manager (GTM) code can be added to specific pages without access to the Code Editor if your page is built with the Encore Template. Access to the code editor is required if your page is built with the legacy template, Premier. Learn to add your GTM code to a page built with Premier.

Learn about standalone Landing Pages.

Step 1. Copy the second GTM code snippet

After adding the first snippet of your GTM code to your page scripts as outlined above, return to Google Tag Manager and copy the second snippet of code provided (note: don't use the sample code shown below, use your own unique site code from GTM):

D7E414F6-DD06-4034-A4CE-BE327401611E.png 

Step 2. Paste the second GTM code snippet

Navigate back to your Kajabi account to paste the second GTM code snippet to your page:

  • Open the page editor for your desired page.
  • Click + Add Section in the left sidebar editor.
  • Scroll down to the end of the list and select Custom Code, then click Add.
  • Then, click to open the Custom Code block in the left sidebar editor.
  • Paste your second code snippet into the Code field.
  • Click Save to keep and apply your changes:


Add GTM Code to a Premier legacy page

Learn to add your Google Tag Manager (GTM) code to site pages built with the legacy template, Premier.

Learn about landing pages.

Note:
Adding your Google Tag Manager code to a page built with the Premier template requires access to the Code Editor only available with the Pro Plan. Learn more about Kajabi's pricing plans

Step 1. Create a Google Tag Manager account

First, create a Google Tag Manager Account.

Step 2. Copy and paste the first GTM code snippet 

After creating a Google Tag Manager account, you're given a unique code to install GTM onto your site.

Warning:
The sample code used as an example in this tutorial will not work for your site. You must copy and paste the unique code for your own site out of your Google Tag Manager account. This code will be provided to you when you create your account in Step 1.

Copy the first snippet of code provided in your GTM account (not the sample code shown below):

977E6280-60DF-4C87-85BF-90AD96A02E20.png

Navigate to your Kajabi account to paste the first GTM code snippet into your page's Code Editor:

  • Open the Code Editor for your page. 
  • Open the Templates folder.
  • Select the index.liquid file.
  • Locate the opening <head> tag.
  • Paste the first snippet of code on the line below the opening <head> tag:

Step 3. Copy and paste the second GTM code snippet

After copying and pasting the first snippet of your GTM Code, return to Google Tag Manager and copy the second snippet of code provided (note: don't use the sample code shown below, use your own unique site code from GTM):

D7E414F6-DD06-4034-A4CE-BE327401611E.png 

Then, navigate back to your Kajabi account to paste the second GTM code snippet into your page's Code Editor:

  • Open the Code Editor for your page. 
  • Open the Templates folder.
  • Select the index.liquid file.
  • Locate the opening <body> tag.
  • Paste the second snippet of code on the line below the opening <body> tag.
  • Click Save to keep your changes:

And that's how you can add Google Tag Manager to your site! Please vote below and let us know if you found this article helpful. We value your feedback. Thanks for being the best part of Kajabi!

Did you find this article helpful?