Google Analytics 4 (GA4) for WordPress Using GTM: Setup Guide

GA4 WordPress Setup

Universal Analytics (UA) will be phased out by June 1st, 2023. At that point, Google Analytics users will have to use Google Analytics 4 (GA4) to collect website visitor data. Ideally, you’ll want to create a GA4 account and set it up for your WordPress website as soon as possible. There are some drastic changes between UA and GA4, so it’s best to start using GA4 sooner in order to familiarize yourself with the latest in Google Analytics.

If you want to set up GA4 for your WordPress website, here are four steps you can take.

  1. Create a Google Analytics 4 account

    Go to your current Google Analytics Universal Analytics account and click on Create Property.

    Google Analytics Create Property

    Enter your website information to create a GA4 property.

    Create Google Analytics 4 Property

  2. Copy the Measurement ID

    Once you have created a GA4 account, you’ll automatically be taken to the Data Stream section in your GA4 account. You can copy your GA4’s Measurement ID there.

    Google Analytics 4 Data Stream

  3. Create a Google Tag Manager (GTM) Account

    Google Tag Manager (GTM) is a Google-powered tag management system that lets you add additional tracking to your website. You can use GTM to track which buttons your website visitors have clicked on for your website. You can also use GTM to add GA4 to your WordPress website by taking these steps:

    • Create a Google Tag Manager account

      Go to Google Tag Manager and click on Create Account.

      Google Tag Manager

    • Fill in company information

      Enter your website URL, country, target platform (e.g. website), and other information to complete your GTM account setup.

      Google Tag Manager

    • Go to admin, select install Google Tag Manager, and copy your GTM code

      Google-Tag-Manager

      Google Tag Manager

    • Go to your WordPress site and go to Appearance, click on Theme File Editor, and then select Theme Header on the right hand side

      GTM WordPress Setup

      Paste your GTM codes in the head section and body section. Once pasted, GTM is officially set up on your website!

    Now that GTM has been installed on your WordPress website, you can add GA4 to your website using GTM. To do so, go to your GTM account, select Tags, and click on New. Next, click on Tag Configuration and choose Google Analytics: GA4 Configuration.

    GA4 Configuation

    Then, paste your GA4’s Measurement ID and select All Pages for Triggering.

    GA4 Configuration

    Once the MeasureMent ID has been added, GA4 will start collecting website data on your WordPress website.

If you have any questions about GA4 setup on your WordPress website, please contact us for a discovery call and we’d be happy to help!