How to Use Google Tag Manager

10/03/2023

Using Google Tag Manager with WordPress is a great way to manage and deploy various tracking codes and scripts on your website without having to edit the code directly. Here's a step-by-step guide on how to set up Google Tag Manager on a WordPress site:

  1. Create a Google Tag Manager Account:
    • Go to Google Tag Manager.
    • Sign in with your Google Account.
    • Click on "Create Account" and follow the prompts.
  2. Create a Container:
    • After creating an account, you'll need to create a container. A container is essentially a collection of tags, triggers, and variables that you want to manage for a specific website.
  3. Install Google Tag Manager on WordPress:

    There are a few ways to install GTM on WordPress. The easiest method is to use a plugin:

    • Log in to your WordPress dashboard.
    • Navigate to Plugins > Add New.
    • Search for "Google Tag Manager" in the search bar.
    • Install and activate a plugin like "DuracellTomi's Google Tag Manager for WordPress".
    • In your WordPress dashboard, you should now have a new section for GTM.
  4. Get Your GTM Container Code:
    • In Google Tag Manager, go to your container and click on "Admin".
    • In the Container section, you'll find a code snippet that looks something like GTM-XXXXXX. This is your container ID.
  5. Insert GTM Container ID:
    • Go back to your WordPress dashboard, and navigate to the GTM settings (usually under a section like "Settings" or "GTM").
    • Paste your GTM container ID in the designated field.
  6. Publish Changes:

    After adding the container ID, save your settings.

  7. Set Up Tags, Triggers, and Variables:
    • Go back to your Google Tag Manager account.
    • Click on "Tags" in the sidebar.
    • Click "New" to create a new tag.
    • Follow the prompts to select the type of tag you want to set up (e.g., Google Analytics, Facebook Pixel, etc.).
    • Configure the tag details, including triggers and variables.
  8. Preview and Debug:
    • GTM has a built-in Preview mode that allows you to test your tags before publishing them.
    • Click "Preview" in GTM, and then visit your website. You should see the GTM debugger at the bottom of your page.
  9. Publish Your Changes:
    • Once you've thoroughly tested your tags and are confident they're working correctly, go back to GTM and click the "Submit" button to publish your changes.
  10. Verify Tracking:
    • After publishing, give it some time for the changes to take effect. Then, use tools like Google Analytics or Facebook Pixel Helper to verify that your tags are firing correctly.

Remember, always be cautious when making changes to tracking codes on your website. Make sure to thoroughly test them in Preview mode before publishing. Additionally, keep your GTM account secure and manage permissions carefully to avoid unauthorized changes.

Comments

No posts found

Write a review