Adding Google Analytics to a site (using GTM)

Objective:

  • Seamlessly add and configure GA4 on your website without technical hurdles.

Prerequisites:

  • Existing Google Analytics 4 account
  • Google Tag Manager installed on your website

Importance:

Google Analytics is the leading tool for website data collection, providing valuable insights into visitor behavior. It helps you understand your website traffic volume and how visitors interact with your content.

Location:

Frequency:

One-time setup for initial GA4 installation.

Who Performs:

Website management or analytics personnel.

Obtaining the Measurement ID:

  1. Access your Google Analytics account.
  2. Navigate to “Admin” and select “Data Streams.”
  3. Choose the website where you want to implement GA4.
  4. Copy the displayed Measurement ID.

Setting Up GA4 in GTM:

  1. Visit https://support.google.com/tagmanager/answer/6103696?hl=en and log in.
  2. Select the container associated with your website.
  3. Click “Tags” and then “New.”
  4. Assign a descriptive name to your tag (e.g., “GA_TrackingCode”).
  5. Under “Tag Configuration,” choose “Google Analytics: GA4 Configuration.”
  6. Paste the copied Measurement ID.
  7. Click the Trigger icon and select “All Pages” to trigger the tag on all website pages.
  8. Save your settings.

Publishing Changes:

  1. Click “Overview” to view the GTM dashboard.
  2. If everything appears correct, click “Submit.”
  3. In the “Submission Configuration” panel, provide a name and description for the version.
  4. Click “Publish” to finalize the changes.

Verification with Tag Assistant Companion:

  1. Select the relevant container and click “Preview.”
  2. Click “Connect” in the new tab and enter your website URL.
  3. Download and install the “Tag Assistant Companion” extension (link omitted).
  4. Refresh the GTM page, click “Preview” again, and then “Connect.”
  5. Navigate through your website pages. The Tag Assistant Companion will display page events.

Verification within Google Analytics:

  1. Open Google Analytics 4 (https://support.google.com/analytics/?hl=en).
  2. Go to “Admin > Data Settings > Debug View.” You should see recent page views.
  3. Alternatively, check the real-time report under the “Reports” section.
  4. Open your website URL in a separate tab.
  5. Return to the Google Analytics 4 tab and wait a few seconds. You should see at least one active user.
Leave a Reply 0

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