The LILI Path

Love it, Live it

  • Crochet
    • All Posts on Crochet
    • Crochet Fundamentals
    • 🧶 Crochet Supplies List
  • Art
    • All Posts on Art
    • Cheat Sheet: Art History Timeline
    • Color Theory for Beginners
  • Etsy
    • All Posts on Etsy
    • How to Sell Print on Demand on Etsy
    • Etsy Keyword Research
    • 🧰 Etsy Setup Toolbox
  • Blog
    • All Posts on Blog
    • Blogging Resources
  • Marketing
    • All Posts on Marketing
    • Social Media
    • Email
    • SEO
  • SHOP
    • The LILI Avenue
    • CraftHutbyQ
  • About

The LILI Path

  • Crochet
  • Art Basics
  • Etsy
  • Blog
  • Marketing
  • ABOUT ME
Home » 4 Easy and Proven Steps to Set Up Free Google Analytics Plugin for WordPress

Analysis, Blog, Google Analytics · October 27, 2023

4 Easy and Proven Steps to Set Up Free Google Analytics Plugin for WordPress

Want to set up Google Analytics plugin for WordPress website for free? This blog post will give you everything you need to know to get started today.

free google analytics plugin for wordpress

Ready to grow your website? Collecting website data is the first step to analysing your website performance. Having set up GA4 for more than 20 websites, I am familiar with the RIGHT way to collect data on the website and will be bringing you through the EXACT steps.

You will learn all about the basics of data collection, how to set up the Google Analytics plugin for WordPress website, quality assessment methods, GA4 setup, and conducting quality checks on data.

By the end of the post, you will be equipped with all the knowledge and skills you need to start collecting your website data today.

This post is all about setting up a free Google Analytics Plugin for WordPress websites.

Basics of Data Collection

Whether you are building your blog from scratch or using platforms like Wix, Shopify, or WordPress, the fundamentals of typical data collection remain the same.

A basic website consists of 2 main components – HTML and CSS. To collect data effectively, we must insert codes into the website’s HTML, often referred to as a data layer. This method ensures the most sustainable data collection. 

Now, you might have heard about the “easy-to-use” settings on Wix, Shopify, and WordPress, where you can simply copy and paste your GTM ID or GA4 Measurement ID, and voilà, your data appears in GA4. 

However, let me explain why this is NOT the best approach:

  • It is like a black box – you lose control over what data is collected and how it is collected.
  • Data accuracy becomes a concern – without a clear understanding of your data collection methods, can you truly trust the data you collected?

If you are comfortable with this approach, feel free to proceed with it. 

Here is a resource I found for those who prefer alternative methods. The article explores three other ways to install GA4 on your site.

I will opt for the method I know is the most RELIABLE. 

If you are building your website from scratch, you will likely need the assistance of developers to insert the codes, a process that can take one to two months. However, I believe that many of you reading this post are just starting and might not want to incur this substantial additional cost.

So, let me explain why I made the choices I did. The core idea here is this:

  1. We have established that we must insert specific code into the HTML of our website for data collection.
  2. This HTML code typically resides in the Themes editor code, or if you’re using Shopify, it’s found in the Code snippet.
  3. The challenge arises when our website’s theme requires an update. When that happens, the code we have inserted gets erased. This presents a significant problem – it means our data collection stopped with every new update.

How do we navigate this challenge? We need a solution that allows us to insert the code and ensure it won’t be erased, even when our website’s theme gets updated. So, what is the solution? 

Well, it’s something called “plugins.” Plugins allow us to preserve the code, no matter what changes our website’s theme undergoes.



4 Steps to Set Up GA4 in WordPress

My method involves using plugins to insert the necessary code into the data layer. This approach not only saves time but is also user-friendly.

These are the 2 plugins I have initially considered:

  1. GTM Kit 
  2. GTM4WP

Upon reviewing the features and the types of events and data they tracked, I decided to go with the GTM Kit. The reason is that it covers essential configurations, such as page views, and even caters to e-commerce aspects.

Even though, as of the current writing, my blog doesn’t incorporate e-commerce elements, it is a part of my long-term plan. I like to approach things with a long-term perspective, and having a solution that accommodates both my immediate and future needs is essential to me.

The best part is that it comes at no extra cost. That being said, both plugins work fine, but for this guide, I will walk you through the 4 steps using the GTM Kit, the one I picked for my blog.

Step 1: Create a Google Analytics Account

Begin by setting up your Google Analytics account and property. Obtain your GA4 Measurement ID, which can be found in Admin > Property Settings > Data Collection and Modification > Data Streams. Copy the Measurement ID, which should start with “G-XXXXXXXXXX.”

Step 2: Create a Google Tag Manager Account

Then, set up your Google Tag Manager account and grab your GTM Container ID. You can find it in multiple places, such as the top right of the interface or in the Admin section. It should start with “GTM-XXXXXXXX”.

Step 3: Install the Google Analytics plugin for WordPress

Next, download the GTM Kit plugin, but do not unzip the folder. In your WordPress dashboard, go to Plugins > Add New > Upload your zip file and click Install. Once installed, click Activate. Follow these steps to complete the installation:

Installation StepsInstructions
GTM Kit Plugin Step 1Copy and paste the GTM Container ID you obtained in step 2.

Click ‘Save and Continue’.
GTM Kit Plugin Step 2Toggle on the ‘Page Type’.

Click ‘Save and Continue’.
GTM Kit plugin step 3This step is optional, depending on your comfort level with sharing information.

I opted to toggle it on.

Once you are done, click ‘Save and Continue’.
GTM Kit Plugin Step 4Here, you need to download 2 files:
1) Google Analytics 4 – Basic Configurations
2) Google Analytics 4 – eCommerce

Open them in new tabs, right-click, and save them as Adobe Acrobat document files.

Step 4: Import the files into Google Tag Manager

In Google Tag Manager, navigate to Admin > Container > Import Container.

  1. Select the file you downloaded in WordPress
  2. Choose the existing workspace or default workspace
  3. Choose Merge > Overwrite
  4. Click ‘Confirm’

Repeat this process for both files.

how do i link my wordpress blog to google analytics

This is what you should see in GTM after importing.

simple google analytics plugin wordpress

You may then go ahead to publish your tags. But, I recommend conducting Quality Assessment (QA) before doing so.

Quality Assessment Methods

Before publishing the tags, it is essential to perform a quality assessment (QA) to ensure the tags fire correctly on your website. There are multiple methods to do this:

Method 1: Via GTM Preview Mode

  • In GTM, click on Preview here.
  • Type in your website URL.
  • Click Connect. Your website and the tag assistant should load.
Quality Assessment Methods

The next step is to explore your website by visiting different pages. In tag assistant, you should see that tags are firing. A successful tag trigger will look like this.

Quality Assessment Methods

Method 2: Via DevTools

  • Make sure you are in the preview mode.
  • Navigate to your website page, right-click anywhere on the page, and select “Inspect”. This action will open the DevTools panel.
  • In the DevTools panel, go to the “Network” tab.
  • Use the filter for ‘collect.’

Now, visit any page on your website. If you spot a string that begins with “collect?v=2&”, congratulations, you are on the right track.

quality assessment tools

For those who are curious, you can also check if it is triggering the right event. In the case of a blog, the key event to confirm is a page view.

Here’s how to do it: Click on the string, then select “Payload.” You should see “en: page_view“. This is what it should look like.

quality assessment tools

Method 3: Via a Plugin

For this method, you will need to download a Google Plugin. I use Dataslayer.

After installing the plugin, you will find it in your DevTools. Now, just move around your website to trigger the event. A successful trigger will look like this.

quality assessment tools

I use all three methods for triple confirmation. Once the QA is complete, you are now ready to publish and start collecting data. Click ‘Submit’ in GTM, and you are good to go.



GA4 Set Up

Next, this section is a bonus for those who want to complete their admin configurations in GA4. Here are 5 key areas I recommend focusing on:

  1. Domain Configuration: Head to Admin > Property Settings > Data Streams > Configure tag settings > Configure your domain. Make sure to add your blog domain. For example, mine is thelilipath.com.
  2. Defining Internal Traffic: In Admin > Property Settings > Data Streams > Configure tag settings > Define Internal Traffic, add your home IP address. This helps ensure your data remains accurate. To locate your home IP address, simply go to Google and type “What is my IP address.” Google will automatically generate your Public IP.
  3. Reporting Identity: In Admin > Property Settings > Data Display > Reporting Identity, I personally set it to Device-based to avoid collecting user data. You can choose the option that suits your preferences. This is about how Google reconciles user data across different devices and platforms.
  4. Acknowledging User Data Collection: In Admin > Property Settings > Data Collection, acknowledge the User Data Collection Acknowledgment. Ensure you’ve covered the necessary disclosures before confirming this step.
  5. Data Retention: Under Data Settings > Data Retention, adjust Data Retention to the longest available option. For the free version, this is typically 14 months. This is crucial if you want to analyse month-to-month data over an extended period.

Quality Checks on Data

The final step is to conduct a quality check after you publish your tags in GTM. This step ensures that GA4 is collecting data in GA4. Here are 2 places to look out for in GA4:

1. Real-time Reports

This should be done right after you publish your tags in GTM.

  • To access real-time data, navigate to Reports > Real-time.
  • Navigate through your website. For instance, visiting different pages, and using the search bar. 
  • Make sure the data makes sense, such as the location and events corresponding to your actions.
quality assessment tools

2. Events Report

I recommend checking this twice: once after you have collected at least 48 hours of data and again after a week of collecting data. Here is what I will look out for for a blogging website:

First check

Go to Reports > Events and check for “page_view” event to make sure that you are collecting blog page views.

data quality checks examples

Second check

Go to Reports > Pages and Screens to see which pages your readers are looking at.

data quality checks best practices

Third check

Visit Reports > Traffic Acquisition to see which channels are driving traffic to your blog.

types of data quality checks

Filter for Session source/medium here and ensure that the data makes sense for you (e.g. Pinterest, Instagram, Twitter, Facebook).

This post is all about setting up Google Analytics plugin for WordPress website the RIGHT way.

If you love to see more content like this, connect & follow me on social media to stay updated with the latest information.

  • Instagram
  • Threads
  • Pinterest
  • YouTube

Other posts you may like:

  • 4 Quick & Easy Steps to Verify Google Search Console for WordPress Website
  • 5 Best Google Analytics Report to Look at for Bloggers
  • 5 Simple Steps to Build The Best Dashboard Your Business Needs

Join the crew!

The LILI Life Newsletter

Get a behind-the-scenes peek into my world as a multi-business owner.

​

Plus, a surprise gachapon in every issue — you won’t know what you will get, but you will definitely want it.

    Your Information is 100% secure and will never be shared with anyone. You can unsubscribe at any time.



    Posted By: Jaslyn · In: Analysis, Blog, Google Analytics

    Step-by-Step Guide: How to Start a Blog for Beginners
    5 Easy Side Hustles to Make Money Online

    You’ll Also Love

    best google analytics dashboardsThe Best Google Analytics Dashboards Every Blogger Needs
    data analytics in ecommerceThe Importance of Data Analytics in Ecommerce
    consumer research survey9 Simple Steps to Conduct Consumer Research Survey to Gather Consumer Insights
    About Photo
    I am Jaslyn - a creative soul with an organised mind and many passions.
    • Business Tool Guide
    • Etsy Setup Toolbox
    • Lift The Fog

    My Shops

    • The LILI Avenue
    • CRAFTHUTBYQ

    My Personal Picks

    • Journal Supplies
    • Crochet Materials
    • Self Care ♡
    • Art Tools

    My business stack

    • Email Marketing Platform
    • Platform to Sell Digital Products
    • Legal Materials
    • Video Editing Tool
    • Social Media Analytics Tool
    • WordPress Themes
    • Privacy Policy
    • Terms and Conditions
    • Disclaimer
    • Contact

    Copyright © 2025 The LILI Path · all rights reserved · Theme by 17th Avenue

    This website is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.