How do I upgrade to Google Analytics 4 (GA4)?
Google Analytics 4 (GA4) is the newest version of google analytics and as of July 1st 2023, it will become the default version of Google Analytics. Here's what you need to know about GA4 and how to prepare for the switch.
In contrast to the current version of Google Analytics, universal analytics (UA), GA4 has shifted its focus to measuring engaged sessions with the ability to combine data from both websites and apps. Whereas UA focuses on session durations and bounce rate metrics.
While most of the data is the same across GA4 and universal analytics, there are some key differences:
GA4 properties can be created and implemented on your website or app today to replace or exist alongside an existing UA tag on a website. Here's how you can get ready for July.
How can I check if am using a GA4 or Universal Analytics property?
Unsure of which version of Google Analytics you're using? When looking at a Google Analytics account, UA IDs start with UA and end with a number, whereas GA4 properties only use numbers.
If you're looking at the tracking tags, the UA IDs start with UA and end with a number, i.e. UA-XXXXXXXXX-2, and GA4 tracking tags usually start with a G and then are a series of numbers and letters, i.e. G-XXXXXXXXXX.
How do I set up GA4?
Below is a guide on how to set up GA4 on both an existing account that has a UA property, as well as a brand-new account.
Set up GA4 for an existing UA property
If you are setting up GA4 for an existing UA property, you can use the setup assistant which will create the new GA4 property within the Google Analytics account. Depending on how the current UA property is set up, you may be able to collect data using the existing tag on the website (this will be a tickbox on the set-up page)
You may find that you cannot tick this box due to the current implementation of your existing tag (or you may want to add this independently with a new tag).
How to add GA4 to your website
To add the new GA4 tag to your website, there are several simple steps to follow:
- Navigate to the admin settings in your GA4 property
- Click on data streams
- Add your website/app as a data stream
- Click the installation instructions to find your tracking code
- Implement this on your website/app
Your GA4 tracking code should look something like this:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
window.dataLayer = window.dataLayer || ;
gtag('js', new Date());
How to set up a new GA4 account
- Head to the admin settings on Google Analytics and click ‘Create Account’
- Fill in the necessary account creation information
- Click ‘Create’
- Next, all you need to do is add GA4 tracking to your site
Set up a GA4 tag with Google Tag Manager
- Navigate to ‘Tags’ on Google Tag Manager (GTM) and click ‘New’
- Click ‘Tag Configuration’ and select GA4 Configuration
- Add your measurement ID found in the GA4 data stream (see the above steps to find this). It should take the form ‘G-XXXXXXXXXX’
- Click Triggering and select whichever trigger you want your tag to fire on (usually this can be set to ‘All Pages - Page View’
- Name your GA4 Tag and click Save
- Click on the blue GTM property in the header to view the GTM code to put onto your website/app. We recommend only using the <head> code, as the <body> script may fire before user consent is given (depending on how your cookie consent banner is implemented)
- To test this implementation, click on Preview and check your GA4 tag is firing as expected.
- The final step is to submit the changes to publish the version of GTM. Click ‘Submit’ in the top right-hand corner to do this. You can also add a name and note for this version.
GTM allows multiple tags to be implemented with just one script, meaning you can inject both UA and GA4 tags on your website (along with any other scripts or tags you wish to include) by using GTM.
If you already have a GTM account with a UA tag, you can use the same account for GA4, and if the GTM script is already on your site then GA4 will automatically start tracking once updates are live on GTM.
5 Tips for using GA4
In GA4, the home dashboard allows you to see a snapshot of the latest figures for your website, and this dashboard will actively change based on which reports you are looking at regularly. By default, the date range here is set to ‘last 7 days’, which can be changed with a drop-down. This data also does contain comparison figures (from the last period) and so is great to see a quick snapshot of data.
How to view a full URL in GA4 reports
One initial thing you may find when you use GA4 is that by default, you cannot see the full URL of a page within the reports and instead see the slug of the URL or the page title. For some businesses, it is important to see the full page URL in order to identify and filter data from subdomains or check for any additional parameters at the end of the URL.
To add the full URL in GA4, you need to add the dimension ‘Page Location’ to your reports.
The steps to add this are as follows:
- Navigate to the report you wish to add this to (we recommend the ‘Pages and screens’ report in the Engagement section of GA4.
- On the top-right of the report page, click on the pencil icon to customise the report.
- Next, click on ‘Dimensions’ and ‘Add dimension’.
- Click on Page location within the list (and optionally click the three dots to set this as default).
- Click apply and save the report (as this is a small change you can save changes to the current report).
It is worth noting that in GA4, most reports and be customised and saved. You can even save custom reports in a collection for easy access in the reports menu!
Where is the device type report on GA4?
To see the device type report in GA4 and analyze how many of your users are on mobile devices, you can go to the reports section. From here, navigate to the ‘Tech’ drop-down and here you should see a ‘Tech details’ report. Click this to discover the device type of your users.
How to view events and conversions in GA4
To view all events and conversion data, you can go to the reports section and click on ‘Engagement’. Here you can find both the events and conversions sections.
From the pages, you can then click on the event/ conversion to see a further breakdown of the specific event.
How to see which page an event or conversion occurred on in GA4
The best way to do this in GA4 is by going to the Pages and screens report and scrolling across to the event or conversion column.
These columns have a drop-down allowing you to select a specific event to filter by.
Once you have selected the event, you can click the column header to sort the data by Events.
Tip: If you want to view the full page URL and not the page title, you can add the dimension ‘Page Location’ to the dropdown (see the section above ‘How to view a full URL in GA4 reports’)
How to link Google Search Console in your GA4 property
To link your Google search console to your GA4 property, go to the admin settings on the property and navigate to Product Links.
From here, click Search Console links and click on ‘Link’ to follow the steps and create the links.
Once this is done, you now need to publish and save the report for easy access in GA4.
- Navigate to Reports and click on ‘Library’
- In the Collections section, you should now see an unpublished collection called ‘Search Console’
- Click on the three dots in the top right of this box and click ‘Publish’
- You can now access the search console reports on the left-hand menu in the reports section
When do you need to switch to GA4?
It is recommended to switch to GA4 as soon as possible to build up a backlog of data for when UA properties stop processing data in July 2023.
You will still be able to log into your existing universal analytics account after this date to see the existing data, but no new data will be collected.
As metrics vary between UA and GA4, it is important to set up a GA4 property so that you are analysing similar metrics once the switch is made.
GA4 can be easily implemented onto your website, even alongside an existing UA tag, so it is best to get this implemented as soon as possible.