Categories
WordPress

How to add Google Tag Manager to WordPress

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

  1. WordPress 3.4 or higher running on PHP 5.6 or higher.
  2. WordPress Admin account with permission to install Plugins.
  3. 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.

  1. Log into WordPress Admin.

    This is usually accessed via yourdomain.com/wp-admin.

  2. Click Plugins.

    Plugins button in the WordPress Admin menu - screenshot

  3. Click Add New.

    Add New button on the Plugins page - screenshot

  4. Search for the Google Tag Manager for WordPress plugin.

    In the Search plugins… field, enter Google Tag Manager for WordPress.Search plugins field - screenshot

  5. Install the Google Tag Manager for WordPress plugin.

    In the Google Tag Manager for WordPress listing, click Install Now.Install Now button on Add Plugins page - screenshot

  6. Activate the Google Tag Manager for WordPress plugin.

    After the plugin has installed, click Activate in the Google Tag Manager for WordPress listing.Activate plugin button - screenshot

  7. Click Settings.

    Click Settings in the Google Tag Manager for WordPress listing.Settings link for Google Tag Manager for WordPress - screenshot

  8. 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.Google Tag Manager ID field, Container code placement radio button and Save Changes button - screenshot