How to Setup Google Analytics 4.0

In this tutorial, I’ll be sharing how to setup Google Analytics on WordPress by yourself.


There are a few options you can choose from depending on your level of technical knowledge and requirements. Each options has their benefits and limitations, by understanding different ways for you to setup Google Analytics for your website, you can better understand which approach suit your needs.


Before setting up Google Analytics, you would need to have a Gmail account first. Once you have your Gmail account ready, you can now start to configure your Google Analytics account.

Configuring Google Analytics 4.0

By default, if you are new to Google Analytics, you would have to setup 2 items:- “Account” and “Property”. 

  1. First, click on “Create Account”
  1. Then, type in your account name, you may put your main company name here. For the options below, remain as it is and click “Next”  
  1. For Property Name, type in your website name. As for the reporting time zone, and currency, you may adjust it based on your geographical market. Once done, click next.
  1. Then, fill in all the requested information requested and click “Create”
  1. Read through the terms of service agreement from Google Analytics, accept it, and click “I Accept”
  1. Select “Web”, then fill in your website URL and a stream name. For website URL, do make sure to check if your website is either having www or without www. And for the Stream Name, it can be any name you can think of, if you don’t have any idea what to write, just put your website name. Once done, click “Create stream”.
  1. Once done, you’ll see something like this.

Congratulations! You’ve halfway done in install Google Analytics for your website. Starting from here, there are a few options you can choose from depending on your needs.

  • Option 1 - Setup using Global Site Tag
  • Option 2 - Setup using Google Tag Manager

Option 1: Setup Using Global Site Tag

This option works well if you are having a very simple website that does not require third-party integrations with other tools such as OptinMonster, FreshChat, or Hotjar. Most importantly, this option supports GA4.0. If you are planning to install these tools into your website, I would highly recommend you to install Google Analytics using the second approach - Using Google Tag Manager. Continue with the following steps if you wish to setup using Global Site Tag.

  1. Click on “Global Site Tag”, copy the code & paste it somewhere. We will be using it later.

  1. Login to your WordPress Dashboard, then Install & Activate “Insert Headers and Footers
  2. On your dashboard, hover towards “Setting”, then click on “Insert Headers & Footer

  1. Paste the code you copied just now on the header section.
  1. Click “Save”, and now the last step is to check if your Google Analytics is capturing traffic from your website. 
  2. Go back to your Google Analytics account and click “Real Time”. Open your website on Incognito Mode and check if there is any real time traffic recorded. Don’t worry if it’s not showing any traffic, make sure your anti-tracker tools are turned off, wait for a few hours and try again. 

Option 2: Setup Using Google Tag Manager

This option is the most preferred option for me because it helps me to better organize all the third party scripts I have on my website and it supports GA4.0. To continue setting up your Google Analytics account using Google Tag Manager, follow the steps shown below.

  1. Copy the Measurement ID somewhere, we will be using it later.
  1. Create an account on Google Tag Manager. Once done, click “Create Account”
  1. Fill in all the required information and click “Create”
  1. Read through the terms of services and click “Yes”
  1. Copy both codes to somewhere and we will be using it shortly.
  1. Login to your WordPress Dashboard, then Install & Activate “Insert Headers and Footers
  2. On your dashboard, hover towards “Setting”, then click on “Insert Headers & Footer
  1. Paste the code you copied just now on the header section & body section. Then, click “Save
  1. Next, you would need to head back to Google Tag Manager to check if it is successfully installed. Do allow a couple of hours if it is showing it is not successfully installed.
  2. Once verified, click on “Folder”, then click “Add Folder”. For the folder name, write “GA4.0
  1. Then, click on the 3 small dots, then click “Add New Trigger
  1. Change the Trigger Name to “Website Visitor”, then click on “Trigger Configuration”, then “Page View”
  1. After having this result, click ”Save”
  1. Click on the 3 small dots again, then click “Add New Tag
  1. Change the Tag Name to “GA4.0 Configuration”, then click on “Tag Configuration”, then “Google Analytics - GA4 Configuration”
  1. Now, remember the measurement ID you’ve copied earlier? Paste it into the box. Then, click on the triggering, and click the trigger you’ve created earlier - “Website Visitor”. Then, click "Save" and "Publish" your tag.
  1. Now, the last step is to check if your Google Analytics is capturing traffic from your website. Go back to your Google Analytics account and click “Real Time”. Open your website on Incognito Mode and check if there is any real time traffic recorded. Don’t worry if it’s not showing any traffic, make sure your anti-tracker tools are turned off, wait for a few hours and try again. 

That’s it! I hope that this tutorial is beneficial for you and you have successfully install Google Analytics 4.0 for your website. 

Get Started
All Rights Reserved © Kelvin Low Digital