A Beginner’s Guide to Google Analytics 4

Google Analytics or GA is an essential tool that website owners must use! Google is constantly updating Google Analytics, and in October 2020, Google Analytics 4 was announced, which is easier to use but more powerful than ever.

In our previous article, we learned that Google Analytics 4 (GA4) is a website visitor tracking and measurement tool for web owners to analyse and improve their websites. Let’s take a look at how to install Google Analytics manually. All you need to do is follow these steps!

Google Analytics ติดตั้งอย่างไร

How to install Google Analytics 4

Create a Property and Data Stream

  • First, log in to analytics.google.com 
  • Fill in the information to create a Property and Data Stream
  • Then use the HTML code or Measurement ID to install GA4

วิธีติดตั้ง Google Analytics ขั้นตอนที่ 1

Method 1: How to install GA using Google Site Tag (gtag.js

Implementing Google Analytics with Google Site Tags (gtag.js) is ideal for newly created websites, including websites that use a Website Builder (a ready-to-use website) or CMS hosting to manage their websites.

วิธีติดตั้ง Google Analytics ขั้นตอนที่ 2

Copy the Global Site Tag and install it in the Header

Copy the code from the Global Site Tag and paste it into the <head> of the HTML. Follow: Data Stream > Select the desired Stream > Tagging Instructions > Add a new on-page tag.

Copy the Measurement ID and install it via CMS

If your website uses a Website Builder or CMS hosting such as WordPress, Wix, Hubspot, or Weebly, copy the Measurement ID and install it in your back-end system following the steps your CMS outlines (read more here). Below is an example of installing on WordPress.com (this can only be used with Premium Business and E-commerce plans):

วิธีติดตั้ง Google Analytics ขั้นตอนที่ 3

  1. Copy the Measurement ID of the Stream you want to measure
  2. Navigate to WordPress > My Sites > Tools > Marketing > Traffic
  3. Select Google Analytics
  4. Enter the copied Measurement ID in the Google Analytics Measurement ID box
  5. Click Save Settings and your website data will now be connected to Google Analytics

วิธีติดตั้ง Google Analytics ขั้นตอนที่ 4

Method 2: How to install GA4 via Google Tag Manager

  • Tracking Code such as Google Analytics or Facebook Pixel
  • Triggers or conditions that define the action of the Tag 
  • Variables are directives for triggers to work more efficiently

วิธีติดตั้ง Google Analytics ขั้นตอนที่ 5

Here’s how to install GA using Google Tag Manager:

  1. Add a Google Tag Manager account by logging in with an existing Google account. Fill in the information and click Accept The Terms of Use
  2. From the left menu bar, select New Tag > Tag Configuration, then press the pen icon
  3. Then select the Tag type as Google Analytics: GA4 Configuration
  4. Enter Measurement ID
  5. วิธีติดตั้ง Google Analytics ขั้นตอนที่ 6
    Select the desired Trigger. For example, if you select All Pages, the Trigger will fire every time the page loads, but if you choose Consent Initialisation – All Pages, the user’s consent will be asked for first before the Tag fire
  6. Once the settings are complete, press Save

วิธีติดตั้ง Google Analytics ขั้นตอนที่ 7

How to Verify Google Analytics’ Behaviour After It’s Installed

  1. Go to Overview page > Press Preview
  2. Enter the website URL into Tag Manager Preview Mode (don’t forget to include https://)
  3. Wait for Tag Manager to connect to the website to enter the debug mode
  4. Verify that Tag and Trigger are working properly
  5. วิธีติดตั้ง Google Analytics ขั้นตอนที่ 8Get back to the Overview page > Press Submit
  6. Fill in the information and press Publish to start using the Tag on the website

Start Using Google Analytics For Your Website & App Today

Google Analytics should be installed once your website is complete. Otherwise, you may lose information. For anyone with their own website or business who wants to be successful online, we recommend studying your website’s analytics regularly. This will give you all the information necessary to plan your strategy and optimise your website.