Google Analytics 4 for WordPress.

WordPress is the most popular Content Management System (CMS) there is on the internet. With a range of plugins, it is used for every kind of website from blogs to lead generation to full ecommerce stores. It’s no surprise that there are a lot of ways to seamlessly integrate Google Analytics and other marketing platforms with WordPress.

WordPress is so customisable that it can be difficult to know what approach is best to take when installing a third party code such as Google Analytics. Not to mention that Google Analytics 4 (GA4) has a very different tracking configuration to Google Analytics 3 (Universal Analytics or GA3).

This article will help you prepare to track Google Analytics 4 for your WordPress website. With Google Analytics 3 sun-setting in July 2023, doing this sooner rather than later is critical.

 

Quick links:

About Google Analytics 4
What to consider to migrate WordPress to GA4
How do I set up GA4 on WordPress?
How do I set up GA4 for ecommerce websites e.g. Woocommerce?
How can Wolfenden help set up GA4 for WordPress?
Post-implementation support


About GA4

Google Analytics 4 is the most recent, modern version of Google Analytics. Google has announced that the previous version of Google Analytics (Universal Analytics) will stop collecting and processing data in July 2023.

Where Google Analytics 3 focused on session-based data combined with event data, Google Analytics 4 is purely event based. It utilises a data collection method that is in line with modern analytics tracking. It offers additional analysis and abilities that GA3 does not offer, such as native integration with Google BigQuery.

Because of the new data capturing method used for Google Analytics 4, migrating is not as simple as swapping some code around.

The recommended way to begin to migrate to GA4 is to run your code alongside your existing tracking, and monitor the differences.

Though this will not be possible after July 2023. If you migrate now, you will be able to get to grips with GA4 while still using GA3 for reporting, and ensure everything you need to track is tracked.

Find out more about GA4 here


What to consider when migrating WordPress to GA4

When you begin to migrate your WordPress website to Google Analytics 4, there are a few considerations that will need to be made.

If you don’t currently use Google Analytics, you should still read this section as there are questions that will help you determine the best solution for you. We offer a  full guide to GA4 migration here, but specifically with regards to WordPress, the main things to consider are the following:

  • Is Google Analytics currently captured using a Tag Management system or not?
  • How is the Google Analytics code (or Tag Management code) added to your WordPress website: manual code on the page, or via a plugin?
  • If using a plugin, which one? Does it have native support for GA4?
  • Is your website an ecommerce website? If so, what platform are you using (e.g. Woocommerce)?
  • Do you need to capture form fills? If so, how are the forms built (using a plugin such as Contact Form 7 or Gravity Forms, or a custom HTML form)?
  • What other tracking points do you require (e.g. video plays)?

One you have an idea of this, you can narrow down how to migrate to GA4.


How do I set up GA4 on WordPress?

Now that you have narrowed down what needs migrating, you can determine the best method. If you are using Google Analytics for the first time (i.e. you never used Google Analytics 3) this will help provide some ideas about how to get set up.

The simplest thing to do for anyone migration from GA3 to GA4 is to use the same methods where possible, but determine where configurations may change.

For example, if you are using a tag management platform, it would be recommended to continue to do so, to keep inline with the GA3 triggers you already use. This will give a good benchmark for comparing GA3 & GA4 data. Ensure any new GA4 tags are tested before going live.

If your WordPress website is an ecommerce website, please note that GA3 and GA4 capture ecommerce data differently. This means that the structure of the data is different, and that your current GA3 ecommerce data may not be correctly processed for GA4. This will be covered in detail in the next section.

If you have not installed GA in the past (or want to capture more data than is already available with your current configuration), there are several ways to go about it.

The first thing to decide is whether you are content with using GA4’s out of the box functionality or if you need to record custom data (such as ecommerce or unique data-points).

  1.  Use a WordPress plugin: better for people who want to get GA4 up and running with little customisation required
  2.  Manual tagging: good for people with the technical coding skills who want greater control over the code on their website
  3.  Hiring a specialist external team like Wolfenden

Use a WordPress Plugin: By using the WordPress plugin store you can search to find a plugin that will aid with the setting up of GA4, or Google Tag Manager if you’re using it. Many plugins are free, however there are some paid options that support more custom features of WordPress (such as authors or ecommerce) by default. Not all of them will be appropriate for your website and what you want to track. A plugin such as Insert Headers and Footers allows an easy way to insert code onto your WordPress website. For Google Tag Manager, we would recommend GTM4WP, a free Plugin that can be used to send custom event pushes for common WordPress plugins such as Woocommerce and Contact Form 7.

Manual Tagging: Working with your development team allows for greater control of the data you capture, and the code that exists on your website. This is often a good choice for those with strong developer capabilities and can also be used to reduce impact on site speed, or reliance on third party tools. We would recommend creating a structured approach to data capture so that conversations between analyst and developer can go as smoothly as possible. For example determine whether the manual tagging requires information being pushed to a data layer for tag managers, or whether the data is getting sent directly from the website to Google Analytics.

Hiring a specialist external team like Wolfenden: We are able to offer an approach that grants the customisation of working with a developer team and without requiring in house knowledge of Google Analytics. If you are new to web analytics we can audit your site and make recommendations for what capture points would be useful, and using our teams expertise, ensure that capturing is smooth and accurate. We can provide you a one-off, no-obligation quote to get you started with Google Analytics 4, no matter what type of WordPress website you are running. We can work alongside your team to find a solution that works best for you.


How do I set up GA4 for ecommerce websites e.g. Woocommerce?

A large portion of WordPress websites also function as ecommerce stores (for example by using an ecommerce platform such as Woocommerce that directly interfaces with WordPress). Ecommerce tracking for GA4 is more involved than most other types of tracking. There is a lot of documentation for developers on how to implement ecommerce events for GA4, however it can be less clear from a more general approach what needs to be done.

No matter whether you use a Tag Manager or not, the structure required for product and purchase data will need to be put into place. Like above, this can be done directly on site or using a plugin. As well as this, events ned to be put into place to actually send that data to Google Analytics.

You should consider for example how to implement the following:

  • Purchases, including what products were bought
  • Item list views
  • Item selection
  • Item detail views
  • Add / removing items from basket
  • Checkout steps progression (e.g. Shipping and Payment method selection)

Those are the ecommerce events recommended by Google, however it is possible to capture even more data if required, to help supplement your business needs.


How can Wolfenden help set up GA4 for WordPress?

If you are interested in Wolfenden supporting your WordPress migration to GA4, here’s a brief overview of what a typical project looks like:

  1.  Scoping: Ensuring that we’re capturing all data points of interest and advising on what we recommend should be collected. Creating a define list of data points that your configuration will own.
  2.  Building: Creating a customised solution that will seamlessly integrate with your WordPress website. This solution would operate using a tag management system (such as Google Tag Manager) meaning future marketing platforms (e.g. Meta for Business) can make use of the same data set
  3.  Configuration: Organising Google Analytics 4 to ensure its settings are configured correctly, such as excluding your team’s IP addresses from website interactions and preventing payment gateways soiling conversion attribution.
  4.  Testing: At each step of the process we’re testing the implementation to ensure it meets our criteria. This doesn’t stop during the build either, we have two post-go-live test sessions to ensure that the data being collected is as accurate as possible.

Fill in the form below to get started.


Post-Implementation Support

After your new GA4 tracking has been implemented, you might find you need additional support – and we’re happy to help. Click on the following sections to find out more about …

 

Get a free quote for a GA4 migration project

If you’d like a no obligation quote for a one-off project for us to migrate your existing GA setup to GA4, fill in the below and we’ll send you a file to give us one-time access to your GA property allowing us to give you an accurate quote over email.

    Read our Privacy Policy here for information on how we use and store your data.

     

    Latest Insights The Team.

    Explore our team’s latest thoughts and actionable advice from our blog to support your digital marketing strategies.

    The Trends That
    Matter.

    Our latest report delves into the challenges and opportunities for brands in the home furnishings industry. Sign up below to receive our latest reports straight to your inbox as soon as they’re published.

      Read our Privacy Policy here for information on how we use and store your data.