If you’ve ever embedded code for Google Analytics or a Facebook pixel on your non-WordPress website, then you know the process requires editing your HTML or PHP files and thus can be tedious or difficult. Even WordPress websites require you to download a plugin–assuming it exists–for each of these snippets of code or to edit the header or footer files.
Herein lies one of the main benefits of Google Tag Manager, which is a system for adding (and maintaining) marketing tracking codes (called “tags”) to your site. You only have to install Google Tag Manager on your website once, and then you can use it to install other tags in a relatively easy-to-use interface automatically–saving you time and effort.
Other examples of tags include LinkedIn Insight Tag, Pinterest Tag and Twitter Pixel.
Here’s how to get started on Google Tag Manager.
HOW TO SET UP GOOGLE TAG MANAGER
First, start an account.
- Go to
https://marketingplatform.google.com/about/tag-manager/ - Click on the “Start for Free” button.
- Fill in the required information (e.g. website URL) and click “Create.”
You’ll be given two sets of code. The first goes in the <head> section (typically found in your header file), and the second goes in the <body> section (typically found in your index file).
OR, if you’re using WordPress, install the plugin called Google Tag Manager for WordPress. In the settings, submit your Google Tag Manager ID (starts with “GTM”), and the plugin does the installation for you (thus, you don’t need to edit the <head> and <body> sections yourself).
INSTALL GOOGLE TAG MANAGER TAGS AND TRIGGERS
To install a new tag, go to your Google Tag Manager account (note: you may have several) and click on “Add a New Tag.” Name the tag (e.g. “Google Analytics”), then click on “Choose a tag type to begin setup.”
Using the Google Analytics example, you would choose “Google Analytics – Universal Analytics.” Now you must choose the “triggers” that activate this tag. In the case of Google Analytics, the only trigger is “All Pages.” (You can learn about advanced triggers in part two of this post.)
When you’re done, click on “Save.” Google Tag Manager has now linked Google Analytics to your website.