How to Set Up a Google Analytics App + Web Property

To get started with App + Web 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.

Properties and Projects

In Google Analytics, the traditional advice I give clients is to create a new property for every website or user experience that you’ve created (note: this is different from creating a property for every domain, because sometimes a single website crosses multiple domains or subdomains without the user noticing).

In Firebase, there are two concepts you need to be aware of: “Projects” and “Streams”.  Although you’ll notice that there are no “Properties” within Firebase, you can apply the same concept to a Firebase “Project” for Analytics purposes.  And each project within Firebase can be made up of one or more “streams” of data, which typically include your iOS app, Android app and Website.

Imagine that you’re a retailer with a website and mobile app.  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 (or project) so that it can be rolled up or filtered by stream in reports.  Each project may contain up to 50 different data streams (source).

BEWARE: When you’re in the implementation phase later, it’s very important that the data you collect in each stream is identical so that it can be rolled up in your reports.  This is a very common problem and it can be difficult to fix, so be very careful to name events and parameters consistently across streams (including case).

Setting Up a New Firebase Project

First of all, when you set up Google Analytics for Firebase three things need to happen:

  1. You will need to create a Firebase project if you haven’t already done
  2. You will need a Google Analytics property that is linked to that Firebase project
  3. You will need to create data streams for each of your website and/or mobile apps

This is evolving rapidly, but at the time of this post there are two ways to get started: 1) a best way, and 2) a quick and simple way.  I prefer the best way for reasons I’ll describe below, but I’ve done both and so I’m including the steps for each:

The Best Way to Set Up Google Analytics for Firebase

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
  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. 

The Quick Way to Set Up Firebase Analytics

The benefit of the quick approach is that it is easy and doesn’t require a credit card, but the downside is that you are putting off setting up critical components. Eventually you will need to go back and create projects for Firebase and Google Cloud to take advantage of all the integrations that they offer, but if you are a procrastinator then feel free to proceed with these steps:

  1. All you need to do is go to your Google Analytics account and open the admin menu to create a new property.  Here you’ll see three options, but you are really choosing between Universal Analytics and Firebase Analytics.

    Select either “Apps and web” (if you are not using web you could select “Apps”, but I still suggest “Apps and web” because you get some other reports) and your new property (also known as a Firebase Analytics “Project”) is ready to go.
  2. Open your property settings and click “Data Streams” to begin setting up your streams.

Setting Up Data Streams

Once your GA 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 pageview 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.

Leave a Reply

Your email address will not be published.