Introduction
These instructions explain how to add Google Tag Manager (GTM) to WordPress using the Google Tag Manager for WordPress plugin. This will allow you to easily add and manage a GTM Container on your site which can include Google Analytics tracking code.
Requirements
- WordPress 3.4 or higher running on PHP 5.6 or higher.
- WordPress Admin account with permission to install Plugins.
- Google Tag Manager Container ID. If you don’t already have one, see How to set up a Google Tag Manager Account and Container.
Skill Level
Basic knowledge of WordPress.
More Info
Google Tag Manager for WordPress plugin page: https://wordpress.org/plugins/duracelltomi-google-tag-manager/
Instructions
Time needed: 5 minutes.
- Log into WordPress Admin.
This is usually accessed via yourdomain.com/wp-admin.
- Click Plugins.
- Click Add New.
- Search for the Google Tag Manager for WordPress plugin.
In the Search plugins… field, enter Google Tag Manager for WordPress.
- Install the Google Tag Manager for WordPress plugin.
In the Google Tag Manager for WordPress listing, click Install Now.
- Activate the Google Tag Manager for WordPress plugin.
After the plugin has installed, click Activate in the Google Tag Manager for WordPress listing.
- Click Settings.
Click Settings in the Google Tag Manager for WordPress listing.
- Complete the General options.
In the Google Tag Manager ID field enter your ID.
In the Container code placement field, select the most suitable option for your site. Footer of the page… can cause problems using all the features of Google Tag Manager. Custom… requires a manual update to the PHP of your site. Codeless injection… should work, but make sure it doesn’t break the front end of your site.
Click Save Changes.