Google Analytics 4 Setup

Google Analytics 4

To install Google Analytics 4, all you need is a Google account with which to sign in. If you use Gmail or YouTube, you can use that email address to log in to Google Analytics 4.

To make things more practical, we’re going to pretend we’re connecting GA4 to a website called Acme Newspaper Company at acmenewspaper.com, which is not a real website at the time of writing this post.

Google Analytics 4 transition help Brad Gerick
Contact me if you need help setting up Google Analytics 4.

Contents:

1. Getting Started with GA4

  • Create a Google Account
  • Sign In To Google Analytics

2. Create a Google Analytics 4 Property

  • Install from Scratch
  • Install from Existing Universal Analytics Account

3. Create Google Analytics 4 Data Streams

  • Create a Web Stream
  • Create an iOS App Stream
  • Create an Android App Stream

4. Install Google Analytics 4

  • Install with Global Site Tag
  • Install with Google Tag Manager

Getting Started

If you already have a Google Analytics account, click here to skip ahead.

Create a Google Account

If you don’t already have a Google account, or would like to create a new one, you can go to the Create your Google Account page.

Sign In To Google Analytics 4

Once you have identified or created the account you’re going to use, go to the Google Analytics 4 website and sign in.


Create a Google Analytics 4 Property

Install from Scratch

When you sign in, if you don’t already have a GA4 account, you will see a page that looks like this:

Click the blue “Start measuring” button to proceed.

On the following page, you will need to complete the following steps:

1. Choose an account name. This should be something concise and closely or exactly match the name of your website.

Example Account Name: Acme Newspaper Company

Review the account data sharing settings – Google products & services, Benchmarking, Technical support, Account specialists – check or uncheck the boxes you desire, and click the blue next button.

2. Property setup. Choose a property name, country, time zone and currency. Don’t be concerned about choosing currency if you won’t run an ecommerce website. Select it anyway and proceed.

Example Property Name: Acme Newspaper

Note: It is possible that your account name and property name are the same, though they don’t have to be. For reference, here is how the account and property name, respectively, appear in the Google Analytics 4 demo account:

A screenshot of the Google Analytics 4 demo account and property name

3. About your business. Again, if you don’t own a business and your website is used for another purpose, don’t get caught up in the terminology. Select your industry category, business size, and share how you plan to use Google Analytics.

The exact accuracy of this information isn’t crucial to using GA4, but in theory it helps Google better tailor your analytics experience.

When you finish, click the blue Create button.

You will not be prompted to review and accept the terms of service agreement and set your email communications preferences.


Install from Existing Universal Analytics Account

Sign in to Google Analytics Universal as you usually do. Go to Admin and in the Property column, click “GA4 Setup Assistant.”

You’ll be brought to this screen. Click the blue “Get Started” button.

You will then see this popup. Click “Create property.”


If you have followed all the steps above up to this point – either from scratch or using the GA4 setup wizard via Universal Analytics – you should now see this page:


Create Google Analytics 4 Data Streams

Create a Web Stream

Either via the setup assistant or the creation of a new property from scratch, you should arrive at the page seen in the previous screenshot. If not, go to Admin and click Data Streams in the property column.

To setup GA4 tracking for your website, choose Web under “Choose a platform” and enter your website name and stream name. If you only have a website with no plans for an app, you can simply enter the name of your website. This could be the same as your property name.

If you also have an app, or might have one in the future, it would be a good idea to name you stream “[website name] Web”.

Example: Acme Newspaper Web

I also recommend enabling Enhanced measurement events (they are enabled by default).

When you finish, click “Create stream” and you have your web stream set up.

Create an iOS App Stream

Click the “iOS app” button and follow the six steps to set up your mobile app stream through Firebase.

“To enable Google Analytics for an existing Firebase project, go to Firebase instead.”

Example Stream Name: Acme Newspaper iOS

Create an Android App Stream

Click the “Android app” button and follow the five steps to set up your mobile app stream through Firebase.

“To enable Google Analytics for an existing Firebase project, go to Firebase instead.”

Example Stream Name: Acme Newspaper Android


Install Google Analytics 4

Go to Admin and click on Data Streams in the Property column. Click on your Web data stream.

You have two different options to install Google Analytics 4 on your site: 1) the global site tag (gtag.js) or 2) the Google Tag Manager GA4 Configuration tag.

Install with Global Site Tag

GTAG: Install from Scratch

Under “Add new on-page tag,” click “Global site tag (gtag.js)”.

“Copy the global site tag into the <head> section of your HTML.” This is the global site tag:

<!– Global site tag (gtag.js) – Google Analytics –>
https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());

gtag(‘config’, ‘G-XXXXXXXXXX’);
</script>

Where you see “G-XXXXXXXXXX” you’ll want to replace the Xs with your measurement ID, while will be included in the code if you copy directly from Google Analytics. Alternatively, you can find the code in the top right portion of the Web stream details popup as shown below.

If you use a website builder like Squarespace or WordPress, check and see if the specific instructions for your CMS are listed here. If so, follow them to complete installation.

GTAG: Install with Existing On-Page Tag

Go to Admin, then Tracking Info then Tracking Code.

Click Connected Site Tags under global site tag (gtag.js).

Connect your Measurement ID, which begins G- and is followed by 10 (or so) characters. This can be located in the top-right portion of the Web stream details as shown above.


Install with Google Tag Manager

To install with Google Tag Manager, you will need a GTM account. I recommend using the same log-in – instructions at the beginning of this post – to manage both GA4 and GTM.

Whether you previously installed Universal Analytics with GTM or are doing so for the first time with GA4, the process is the same.

Go to Google Tag Manger, and from the Overview page, click “Add a new tag.” (This can also be done by going to the Tags menu, below Overview, and clicking the “New” button once on that page.)

Click Tag Configuration and select the Google Analytics: GA4 Configuration tag.

Enter your measurement ID, which can be found in the Web stream details pop-up of Google Analytics and begins G-…. (See the screenshot further up in this post to see where it’s located.)

Then click in the triggering box and create/select a Page View tag that fires on all pages. Give the tag a title – I chose “GA4 Configuration” – and save your tag. When you’re finished, it should look like this:

You can confirm your tag is functioning properly by testing it in Google Tag Manager preview mode in conjunction with Google Analytics 4’s DebugView, found under the Configure menu.

When you’re on your website, the GTM preview mode dashboard should look like this. As you can see, my GA4 Configuration tag is listed under Tags Fired.

That’s it – you should now be collecting data in Google Analytics 4.

Do you have any tips I didn’t mention? Email me or share them in the comments.

Leave a Reply