Google Tag Manager can dramatically simplify the number of code snippets required to send information to external services such as Adwords or Google Analytics.
In this article:
Access Your Google Tag Manager Code
Adding Google Tag Manager to Your Site Theme Code
Adding Google Tag Manager to Your Site Footer Code
Troubleshooting Google Tag Manager
Access Your Google Tag Manager Code
To get started, log into your Google Tag Manager account. If you haven't created an account yet, click on Sign up and complete the form from Google.
When you initially log into Google Tag Manager, you will be asked to create an account. First, name your account (you can choose any name you'd like), and select your Country:
Next, choose a name for your container (again you can pick any name you'd like), ensure you choose Web under Target platform, and click Create:
You'll now see code that can be installed on your Thinkific site:
Installation Options
There are two options for installing Google Tag Manager on your Thinkific site:
- Install in Site Theme Code (requires access to theme code)
- Install in Site Footer Code (available on any paid plan)
Adding Google Tag Manager to Your Site Theme Code
Important Considerations:
- Google Tag Manager will fire on your site pages but will not fire on your Course Player or your Performance Checkout page
- If you are using Google Tag Manager, we recommend not using our built-in Google Analytics integration to prevent any conflicts
Part 1: Adding Google Tag Manager to Your Site Header Tag
The top section of code is added to the <head> tag of your Thinkific site theme code.
- Copy the above Google Tag Manager (GTM) <head> code
- Go to Channels
- Under Website, select Theme Library
- Click the ellipses (3 dot icon)
- Click Edit Code
- Select the Layout folder
- Select Default
- Locate <head> within your theme code
- Paste your GTM Code in between <head> and </head>
- Click Save
Part 2: Adding Google Tag Manager to Your Site Body Tag
The second section of code is added to the <body> tag of your Thinkific site theme code.
- Copy the above Google Tag Manager (GTM) <body> code
- Go to Channels
- Under Website, select Theme Library
- Click the ellipses (3 dot icon)
- Click Edit Code
- Select the Layout folder
- Select Default
- Locate <body> within your theme code
- Paste your GTM Code in between <body> and </body>
- Click Save
Adding Google Tag Manager to Your Site Footer Code
An alternative option to installing Google Tag Manager in your Theme Code is to install it in your Site Footer Code.
Important Considerations:
- Google Tag Manager will fire on your site pages, it will not fire in your Course Player.
- Google Tag Manager can't be used with the Performance Checkout.
- Google Tag Manager will load at the end of page load. The main reason for adding it to the Header (Theme Code option) over the Footer is to ensure that the piece of code loads at the beginning of the page load as opposed to the end of load to ensure accurate tracking. For example, if a visitor accesses a page on your site and then navigates away before the page completely loads, Google Tag Manager may not run.
- This is a non-standard implementation, which means you may see a notification from Google letting you know that the script isn't a child of the tag:
Although you may see this message, adding Google Tag Manager to your Footer shouldn't have any negative impacts beyond loading at the end of page load as listed above.
How to Add Google Tag Manager to your Site Footer Code
- Go to Settings
- Select the Code & analytics tab
- In the Site Footer Code area, paste both the <head> code and <body> code
- Click Save
You might see a red x within the code area. You can disregard this, it will not affect the installation of your code.
Testing Google Tag Manager
You can use Google Tag Assistant Chrome Extension to check if your code was installed and is firing correctly on your site!
Note that you will see additional code with the Google Tag Assistant listing Google Analytics UA-30557184-1. This is Thinkific’s GA code. We use this to track how our course creators and students are using our platform. This data is then aggregated to help us improve our products in areas like browser compatibility. This does not have any adverse effects on your GA tracking and the results that you see and as this is automatically applied for all Thinkific sites. We don't have the option to disable this on your site.
Troubleshooting Google Tag Manager
Error Code: HTTP response code indicates tag failed to fire: Status 404. This could be due to an empty or unpublished container.
- The tag will be yellow in Google Tag Assistant
- Solution: Publish your container, even if it’s empty. You should be able to do this from your Google Tag Manager dashboard by hitting “Submit” in the top right corner, and "Publish" on the next screen.