Google analytics 4

How To Set Up Google Analytics 4 For A Website And Web App

The new version of Google Analytics, known as Google Analytics 4 (GA4), was introduced in October 2020. You can utilize the new GA4 for a website, an app, or both simultaneously, in contrast to the outdated Universal Analytics properties.

GA4 performs remarkably in tracking the most recent market trends and consumer behavior across devices and platforms by utilizing Google’s cutting-edge machine learning models. A superior ROI is guaranteed by the privacy-centric design, especially for your long-term marketing strategies.

Creating a new GA4 account, upgrading to a new GA4 account, and adding a GA4 tag to your website are all covered in this post. For a detailed explanation, including screenshots, keep reading.

Why is GA4 Used Heavily?

For firms who already have an app or are actively creating one, GA4 has the most obvious advantages. In these circumstances, you cannot avoid giving in to GA4 and the Firebase SDK.

Perhaps you do not know of an app and do not have one planned for the foreseeable future. However, if you want to future-proof your web implementation, GA4 should be on your radar.

You can capture your historical data into the GA4 Property by doing this now before you are compelled to migrate. In this manner, you will have access to your data for several years. When your existing analytics property ultimately “shuts off,” you will not be forced to switch between various properties to piece together reports.

💡  Bonus: If you decide to build an app, you already have the web stream running into GA4 and have a working knowledge of the reports.

An Overview of Dual Tagging

The best practice for integrating GA4 on your website before Google forces the migration is dual tagging. Setting up both a GA4 property and a Universal Analytics property for websites is known as dual tagging.

You must create a comparable tag in GTM for GA4 for each tag you have set up in GTM. The procedure for setting up a single, dual tag is described in this article. This procedure must be repeated until parallel GA4 tags are present for all of your current UA tags.

💡  Note: This guide assumes that your websites already use Universal Analytics.

Dual tagging and Data Flow

The data flow from your website to your hit-level data in BigQuery has been outlined in the diagram below. Please note that this depicts the data flow for GTM implementations only.

Through dual tagging, you can see that GTM is working overtime to deliver information to your UA Property and your GA4 Property.

Google Analytics 4 Properties

Google Analytics monitoring has been modified in its beta version as GA 4 Properties (formerly App + Web). While GA4 Properties and the default Universal Analytics properties, which are currently in widespread use, share some similarities, GA4 Properties departs from many features of Universal Analytics, such as its hierarchical event structure, and places a greater emphasis on session metrics and session-scoped data.

Whether or not you have an app to track, we urge you to become familiar with GA 4 Properties: In both web and app analytics, event-based reporting is the way of the future. Launching GA4 Properties concurrently with your present analytics solution is a beautiful idea because this tracking is the analytics future. We will concentrate on implementing GA4 Properties tracking in this tutorial.

Setting Up Google Analytics 4 Implementation On Your Website

A new GA4 property must be created before you can deploy dual tagging on your website and GA4.

Once more, the instructions in this article describe how to set up a single generic dual tag. This excludes the conversion of user properties or custom parameters into custom dimensions. This procedure must be repeated until parallel GA4 tags are present for all of your current UA tags.

Additionally, we have provided instructions on implementing GA4 using gtag.js, which only requires a few extra steps.

Step 1: First, make a GA4 Property.

You should create two GA4 properties for most implementations: one for production and the other for lower settings like development, testing, and user acceptance testing.

  • Specify the property’s name (such as “My Business, Inc. website”), reporting time zone, and currency. The visit is logged as having happened on Monday if a visitor accesses your website on a Tuesday in their time zone but a Monday in yours.
  • Analytics will adapt to time changes if you select a time zone that observes Daylight Savings Time. If you do not want to change to Daylight Savings Time, use Greenwich Mean Time.
  • Data only changes in the future when the time zone is changed. If you switch a property’s time zone, you can notice a flat area/ spike in your data due to the time shift, which might be forward/ backward.
  • After you modify your settings, report data can still use the previous time zone for a short while as Analytics servers digest the change.

💡 Tip: We advise that you switch a property’s time zone no more than once every day so that Analytics can consider the shift.

💡 Note:

  •  To create your GA4 properties, you must have administrator capabilities.
  • Are you advancing from the previous step, “Create a property”? Go directly to step 2 if so. Otherwise, ensure your preferred account is selected in the Account column in Admin. After that, ensure your desired property is selected in the Property column.

Step 2: Add a Web Data Stream in UA.

Your new GA4 properties can have a Web data stream added via – (you can add app data streams later).

As prompted, enter your website’s name and URL.

You will receive a Measurement ID after providing the necessary site information: G-XXXXXXXX (example below). Be sure to copy that ID before you finish generating the stream. You’ll require it for the following GTM phase.

How many data streams are required for your particular use case may be something you are pondering. You may always add more web streams later. Try starting with one.

Step 3: Integrate Google Tag Manager with GA4

This implies that your website is GTM-tagged and that all your events and pageview tags are configured and operational.

Make a GA4 Configuration tag first. This is comparable to your Universal Analytics Pageview tag. Add Fields to set User Properties, and use Advanced Settings to modify the tag as desired. This tag also functions as your Global Settings Variable for Universal Analytics tags. It should to be configured how you want it for events and pageviews. This Configuration tag will be a reference in all of your GA4 Event tags. This excludes the conversion of user properties or custom parameters into custom dimensions.

Set the trigger to shoot on All Pages, provide your measurement ID, and publish. You have now finished creating one generic dual tag for your website. This excludes the conversion of user properties or custom parameters into custom dimensions.

GA4 addition with gtag.js

You can directly include gtag.js on your page as an alternative to Google Tag Manager. There are two ways to do this: JavaScript or property configuration are the two options.

GA4-tag scrtip

  • The ID of the Google Analytics property to which you want to send data should be substituted for MEASUREMENT_ID. 
  • The fastest way to track pageviews without developer involvement is through property configuration.
  • Go to your “Universal” property and click the link for your GA4

Frequently Asked Questions (FAQ)

1. What if I already created a property in Google Analytics for GA4?

A Firebase project still exists for your property if you already built a GA 4 property in GA without first creating a Firebase project. If you are configuring an app stream solely, a Firebase project is automatically established behind the scenes when you add a GA4 property within GA. You may find your Firebase project by heading to the Firebase console If you need to access it.

💡 Note: If you merely built a web stream in GA, there would be no Firebase project. Nothing more has to be done in this situation because it is expected.

2. Will Firebase Display Any Data? Or will Google Analytics be the only source of data?

Any app and website data that you gather with GA4 Properties will also be visible in Firebase!

3. How Much Will GA4 and Firebase Properties Cost?

While there are Firebase products that cost money, GA4 Properties is free, and using other Firebase products—whether they are for money or not—is not required.

4. How To Connect To Google Ads?

1. The next thing to consider is connecting the Google product after setting up your data streams. Although GA4 isn’t quite as feature-rich as UA, Google Ads can still be linked to it.
2. You should link Google Ads to GA4 if you are running Google Ads. Without going into too much detail, GA4 provides predictive audiences. Google Ads can be utilized to market to certain forecasted audiences.

5. How To Connect To A Big Query?

This is the best post news for all of the data nerds out there. Now, it is possible to access Big Query without Google Analytics 360.
For your GA4 account to be linked to BigQuery:

1.Select BigQuery connecting in the property column on the admin panel.
2.In the top left corner, click Link.
3.Choosing a BigQuery project is done.
4.Select the project you wish to link to from a list of BigQuery projects to which you have at least “read” permission.
5.Decide where to put the data.
6.The data streams you want to export must be specified.
7.The frequency of data export is your choice.
8.Review adjustments and submit them.

You now have a connection between GA4 and BigQuery.

Future Steps

The next step would be to set up dual tagging across your event tags to replicate the existing tagging you have in place once you have configured dual tagging for your page views. Things start to become more complicated, which we will discuss in a subsequent post.

The possibilities are endless now that you know where to save your GA4 Properties data and understand the fundamentals of delivering data to your new property. Keep learning more about GA4 Properties and, if you can, build up event tracking in GA4 Properties that match your existing Universal Analytics collection. Get familiar with the configuration and reporting of GA 4 Properties.

💡 Keep an eye on this space for future blog postings about GA4 Properties! Reporting, new dimensions and metrics, permissions, advanced implementation opportunities, and upgrades to GA4 Properties will all be covered in these postings when new features are released.