How to Set Up a Google Analytics 4 Property

Hello world with GA4.

To get started with Google Analytics 4 you’ll want to create a new Google Analytics property, and then set up data streams for each of your websites and/or apps.

I strongly encourage my clients to read through this document before starting this process! You can find Google’s instructions on this process here, but if you’re not careful during setup you might make some irreversible mistakes! This post will familiarize you with the concepts and what is happening behind the scenes when you walk through the setup process.

  • Updated to reflect changes to integrating BigQuery with a GA4 property.

  • Migrated to new CMS

Accounts, Properties and Projects

The standard way to set up accounts is 1 account per business. Each account can have 2,000 properties (source), so your business will need multiple properties if you have more than 2,000 properties.

For Properties in Google Analytics (all versions), the advice I give clients is to create a new property for every website or user experience that you’ve created. This is different from creating a property for every domain, because sometimes a single website crosses multiple domains or subdomains without the user noticing.

If you choose to use Firebase, you will also need to be familiar with the concept of a “Project”. A "project" in Firebase Analytics corresponds to a "property" in Google Analytics 4, and they are the same thing on the backend. When planning your account structure you can apply the same concept in the paragraph above to both properties and projects.

In both Firebase Projects and GA Properties, data flows in through a “stream”. Each project/property must have at least 1 stream, but can have up to 50 (one for each iOS app, Android app or Website).

Imagine that you’re a retailer with a website and mobile app (iOS and Android). Regardless of which device a user is running the experience will share a common structure: a homepage, a search results page, product category pages, product detail pages, and a checkout flow. Since the user’s experience is duplicated (at least roughly) across each platform, you can stream data from each into a single database (the project/property) with a common schema so that it can be rolled up or filtered by stream in reports. Each project/property may contain up to 50 different data streams (source).

Streams and projects

BEWARE: When you’re in the implementation phase later, it’s important that the data you collect in each stream is identical so that it can be rolled up in your reports. Event and parameter names should be consistent across streams (including case).

Setting Up a New Google Analytics 4 Property

First of all, when you set up a Google Analytics 4 property you have to decide if you want to link this property to a Firebase project? The benefit of linking a GA4 property to a Firebase project is that it will allow you to take advantage of other Firebase products. If you have a native app (iOS or Android) then you'll need to do this, but it is also useful for web apps.

This may change eventually, but if you think you may ever want to link Google Analytics 4 with a Firebase project then you need to follow OPTION 1 below. If you're just setting up GA4 for a simple website then this is probably not necessary, and you can skip to OPTION 2.

OPTION 1: Set Up Google Analytics 4 with a Firebase Project

This approach fully enables all of the services you will need, and sets up a billing account in case you later decide to use a product that has an associated fee like the BigQuery integration (Firebase Analytics is free). To do this, follow these steps:

  1. If you haven’t already, create an account in Google Analytics
  2. Go to Google Cloud Console and setup a new project with a billing account (you'll need to enter a credit card, but you will not be charged anything yet)
  3. Open the Firebase Console, click “Add Project” and select the project you just created in the Google Cloud Platform. You will then be prompted to link your Firebase project with a Google Analytics account.
  4. Finally, open Google Analytics and take a look at the new property that has been created for you (it will have the same name as your Google Cloud project ID). Open your property settings and click “Data Streams” to begin setting up your streams (more on that below).

You can now manage the integration between Google Analytics and Firebase from the settings in your Firebase project.

OPTION 2: Set Up Google Analytics 4 without Firebase

Before we get started with option 2, here is the caveat with this approach: If you choose to link your Google Analytics 4 property with Firebase at a later point in time after following the steps below, your streams will not appear in the Firebase project. As a result, only follow these steps if you are certain that you will never want to use Firebase.

  1. All you need to do is go to your Google Analytics account and open the admin menu to create a new property.
  2. Open your property settings and click “Data Streams” to begin setting up your streams.

Setting Up Data Streams

Once your GA4 property has been created it’s time to start streaming data into it. For mobile apps this just means following the steps to add Firebase to each app, but when you stream data from a website you have a very cool new option called “Enhanced Measurement”.

Enhanced measurement adds some basic tracking beyond the typical page_view that you previously got when deploying Google Analytics on a site, such as: scroll tracking, video interactions, and clicks to download files. Items on this list that are irrelevant to your business should be disabled because they will add unnecessary code to your site, but definitely take advantage of these where they make sense.

Where is My Tracking ID?

Now that you’ve set up a new property and web stream, you may be wondering where your “UA-” number is (also known as the property ID or tracking ID). When you set up a web stream, the concept of a “UA-” number is replaced with a “Measurement ID”. The measurement ID takes the form of “G-XXXXXXXXXX”, and it is used to identify your stream. If you’ve already installed GTM or the gtag, then you can add this measurement ID to your settings without needing to change any code on your site.

For GTM Users: When you’re ready to start collecting data, you’ll just add this measurement ID to the “App + Web Configuration” tag in Google Tag Manager. You can learn more about this in my post on Setting Up Your First Page_View in GTM.

For gtag Users: If you’re using the gtag, go to: Admin > Tracking Info > Tracking Code and click “Connected Site Tags” under “Global Site Tag” to connect this measurement ID.

Previous
Previous

Using Google Analytics 4 with Single Page Apps

Next
Next

Differences between Traditional Google Analytics and Google Analytics 4