Configuring Google Analytics (Universal Analytics)

⚠ Note: “Google Analytics 4 is our next-generation measurement solution, and it’s replacing Universal Analytics. On July 1, 2023, standard Universal Analytics properties will stop processing data. We strongly encourage you to make the switch to Google Analytics 4 as soon as possible.”
Google

I recommend reading our guides on installing GA4 for the first time and migration from UA to GA4.

Setting Up Google Analytics

Create a free account or login here: https://analytics.google.com/. Here’s a step-by-step tutorial on how to install Google Analytics.

Configuring Google Analytics

Most likely, the site you are going to work on already has Google Analytics set up. If this is the case, you can just make sure that it’s configured properly.

Check That Google Analytics is Tracking

Log into Google Analytics and click on “Real-Time”. This shows if any users are currently on the site. Visit a specific page and remember the URL. You can click on the “Content” tab under “Real-Time” to see if it’s tracking you properly. If it is, then great!

test-google-analytics

Multiple Google Analytics Tracking Codes

You can install multiple instances of the Universal Analytics tag (analytics.js) on your web pages but only one instance of the Classic Analytics code (ga.js). Multiple instances of ga.js might result in inaccurate data collection, processing, or reporting. You can, however, install one or more instances of analytics.js on web pages that also have a single instance of ga.js.

Reference: https://support.google.com/analytics/answer/1032400?hl=en

So if the client has more than one Google Analytics tracking code on their site, make sure there is not more than one Classic Analytics (ga.js).

Default URL

You will need to review the “Default URL” in the Property Settings and in the View Settings. If there are multiple “Views” in the View Settings, you will need to review all of them.

Go to the Property Settings and View Settings in Google Analytics. You can see which version is being tracked. Make sure it’s set to the preferred version (one of these: http://, http://www, https:// or https://www). If you make any changes here, make sure to view live traffic data to make sure Google Analytics is still tracking properly.

google-analytics-settings

google-analytics-default-url

Google Analytics Goals

Throughout the BHB guides, I show you how to set up goals in Google Analytics. For your convenience, I’ve included them all in one place here. You can import Google Analytics Goals using these links. Keep in mind that these goals won’t track anything if you haven’t set up the necessary event tracking first.

The following Google Analytics goals requires you turn on integrations in CallRail or Call Tracking Metics first. Otherwise, the goals won’t work.

The following Google Analytics goals requires you import this Container into Google Tag Manager first. Otherwise, the goals won’t work.

Download GTM Container

The following Google Analytics goal requires you set up the Gravity Forms Event Tracking plugin first. Otherwise, the goals won’t work.

Google Analytics Segments

[COMING SOON]

Only Include Hits Form Your Own Domain

[COMING SOON]

https://ahrefs.com/blog/google-analytics-tracking-mistakes/#tracking-hits-from-other-domains

Merging Sources & Mediums

[COMING SOON]

https://ahrefs.com/blog/google-analytics-tracking-mistakes/#not-merging-sources-and-mediums