Mafujibrahim

Setting Up Google Tag Manager for Google Analytics

Purpose

To ensure proper tracking of website analytics by setting up Google Tag Manager for Google Analytics.

Scope

This SOP applies to the digital marketing team and web developers responsible for website analytics.

Prerequisites

  1. Access to the Google Tag Manager account.
  2. Access to the Google Analytics account.
  3. Administrative access to the website’s CMS or source code.

Steps

Step 1: Create a Google Tag Manager Account and Container

  1. Navigate to Google Tag Manager: Go to Google Tag Manager.
  2. Sign in with your Google account.
  3. Create a new account:
    • Enter your account name.
    • Select your country.
    • Enter the container name (usually your website’s name).
    • Choose “Web” as the target platform.
  4. Click “Create” and review the GTM Terms of Service.
  5. Click “Yes” to accept the terms.

Step 2: Add the GTM Container Code to Your Website

  1. Copy the GTM container code provided after account creation.
  2. Insert the code into your website:
    • Place the first code snippet in the <head> section of your website.
    • Place the second code snippet immediately after the opening <body> tag.
  3. Save the changes and publish them on your website.

Step 3: Set Up Google Analytics in Google Tag Manager

  1. Open your GTM workspace.
  2. Create a new tag:
    • Click on “Tags” in the left-hand menu.
    • Click on “New” to create a new tag.
  3. Configure the tag:
    • Click on “Tag Configuration”.
    • Select “Google Analytics: GA4 Configuration”.
    • Enter your Measurement ID from Google Analytics (found in your GA account under Admin > Data Streams > Web).
  4. Set up the trigger:
    • Click on “Triggering”.
    • Select “All Pages” to fire the tag on all pages.
  5. Save the tag configuration and name your tag (e.g., “GA4 – All Pages”).
  6. Submit and publish the container:
    • Click on “Submit” in the top right corner.
    • Add a version name and description.
    • Click on “Publish”.

Step 4: Verify the Setup

  1. Use Google Tag Assistant:
  2. Check Real-Time Reports in Google Analytics:
    • Go to your GA account.
    • Navigate to the “Real-Time” report.
    • Verify that your visits are being tracked.

Maintenance and Troubleshooting

  1. Regularly monitor the Google Analytics data to ensure it is capturing all necessary information.
  2. Update GTM tags as necessary when adding new features or pages to your website.
  3. Troubleshoot issues by checking the GTM Debug mode and using the Tag Assistant.

Leave a Reply

Your email address will not be published. Required fields are marked *