In October 2020, Google launched GA4, the latest version of Google Analytics. It has now become the default analytics property for new accounts, replacing Universal Analytics (UA). To ensure you stay up to date with future improvements, it is recommended to use GA4 alongside your existing UA properties. This guide will walk you through the installation process if you already have a GA UA installation.
Update: As a web analyst, I’m deeply disappointed with GA4 and its limitations for implementing e-commerce tracking on our custom website with multiple suppliers and no stock. Despite investing weeks of effort into the implementation, it became increasingly clear that GA4 lacked the necessary flexibility and failed to provide the insights for our complex e-commerce setup.
Exploring other analytics platforms became a priority in order to overcome the limitations we faced with GA4.
Create a new Google Analytics 4 property
- Click on “Admin” and select an existing account.
- Click on “Create Property.”
- Enter the name of your new property, choose the reporting time zone and currency, and click “Next.”
- Answer the business-related question and click “Create.”
Configure your Data Stream
After creating the property, set up a data stream to collect data. A GA4 property can have up to 50 data streams, including app and web data streams. For this guide, we will focus on the web data stream:
- Enter your website URL and provide a name for the stream.
- Select the features you want to activate, such as enhanced measurement for events.
- Click “Create Stream.”
Install the tracking code on your website
To send data to the newly created data stream, you can configure your website using the following methods:
- Copy and paste the gtag.js code into the section of every web page you want to measure.
- Replace “G-XXXXXXXXXX” with your GA4 property’s MEASUREMENT ID.
Method 2: Installation with Google Tag Manager (GTM): If you’re using Google Tag Manager, follow these steps:
- In your GTM container, go to “Tags” > “New” and select “Google Analytics: GA4 Configuration.”
- Name your Tag as GA4.
- Enter the measurement ID from your GA4 property.
- Select “All pages – pageviews” as the firing trigger and save your settings.
Installation with an existing on-page tag with Google Analytics
If you already have gtag.js for another Google Analytics property on your page, follow these steps to turn on tagging for the new stream:
- Open the Google Analytics property controlling your on-page tag.
- Go to “Admin” > “Tracking Info” > “Tracking Code.”
- Under “Global Site Tag (gtag.js),” click on “Connected Site Tags.”
- Connect your new Measurement ID.
Verify the implementation
To ensure that the new implementation is functioning correctly, access the real-time report:
- In the Google Analytics user interface, choose your GA4 property from the drop-down list.
- Go to “Real-time” reporting in the left sidebar menu.
- Check the events and activity on your website in real time.
By following these steps, you can successfully install Google Analytics 4 (GA4) and start collecting data for improved analytics insights. Stay up to date with the latest advancements in Google Analytics by using GA4 alongside your existing properties.