How to Install Google Anlytics without GTM
You decided to install Google Analytics (GA4) to track your website visits, and you wonder whether you can do it without Google Tag Manager (GTM).
The good news is that there is no need use GTM to set up Google Analytics 4 (GA4). To collect GA4 data without GTM, you should use GTAG.
In this article, we will discuss how to set up GA4 without GTM. We will cover the topics of creating an account, setting up the Analytics property, and adding the tracking code to your website.
To install GA4, follow these steps:
- Create a GA4 property in Google Analytics.
- Create a Web Data Stream.
- Copy your GTAG code snippet.
- If you have a Universal Analytics snippet on your site, replace it with GTAG snippet; If you never had GA on your site, add the snippet to your site using Google’s instructions.
- Validate your installation.
What You Need for GA4 Installation
- The login for your Google Analytics account if you have one.
- Access to the backend of your website, like your WordPress or Wix login.
If you are unsure whether you have UA tag installed on your website, use my detailed guide on determining that.
Let’s get started.
Create a GA4 Property in Google Analytics
- Log into analytics.google.com.
- Create a GA4 Property:
- If you never created a Google Analytics Account, a welcome page appears. Click on Start Measuring. You will be asked to name your account – generally, it’s your domain name.
- If you already have a Google Analytics account, click on Admin in the lower left corner. Choose or create your Account, and then click on Create Property.
- In the Property Setup, name your property. I recommend naming it with your domain name plus GA4. Answer your business questions. Accept the terms.
Create a Web Data Stream
- You are now in the Admin=> Property => Data Stream menu. Choose Web Data Stream for collecting web data. Alternatively, you may choose iOS/Android option if you have corresponding apps.
2. Populate your website URL and name, keep the enhanced measurement toggle on, and click on Create Stream.
3. In the web data stream, you will Google tag installation instructions appear on top of the page.
Copy your GTAG code snippet
Your GTAG snippet instructions appear either on top of the Web Stream page or can be located at the bottom of the Web Stream page, under View Tag Instructions.
Install the GTAG snippet on your website
- The best practice is to collect data in both UA and GA4 through one tag. For that, delete the old UA- tag snippet and replace it with the new G- tag snippet.
- The Install with a website builder or CMS option will provide instructions for several specific builders and WordPress plugins. You can also find Google tag installation instructions for various web builders here.
- Alternatively, Install manually option gives you the snippet to install using Header and Footer plugins or manually adding to the page code. Add the snippet to the Head section.
Below is an example of a tag installation using Code Snippets plugin on my website. Note that you should install your GTAG snippet in the Header section only.
Validate Your Installation
For validation, visit to your website and see if your pageviews appear in Google Analytics Reports -> Realtime.
For detailed instructions, visit my validation guide for GA4 properties.
Switching from GTAG to GTM and back
Setting up Google Analytics 4 (GA4) is a great way to gain valuable insights into your website’s performance and user behavior, and for standard enhancements to work, GA4 does not require the use of Google Tag Manager (GTM).
However, if you decide to install a GTM container later, you can send GTM events to the same GA4 property, thus continuing to collect the events without disruption. You can also switch back from a GTM container to a GTAG on the same GA4 property. Use my full guide for GA4 installation to switch between GTAG and GTM container for events collection.
Set up BigQuery Export
After working with GA4 for a few years, it is my sincere belief that everyone should set up a GA4 BigQuery export, whether they have immediate plans to use this data or not.
The export itself is free, but you need to add a billing method to your GCP project to save more than 60 days of data, which I very much encourage you to do.
But you don’t want to pay for something that you don’t use!
That’s 100% fair.
It is unlikely that you run out of the free allocation of storage on Google servers in the next few years, and even if you do, the value of the free tier allocation is currently at $0.10 to $0.40 a month. You are exceedingly unlikely to go broke by simply saving your data.
However, setting up the export will allow you to start saving raw event history, which you won’t be able to replicate using any other methods.
by Tanya Zyabkina
Tanya Zyabkina has over 15 years of experience leading analytics functions for multiple Fortune 500 companies in the retail and telecom industries. Her experience spans from qualitative market research in the fashion industry to determining the impact of promotions on subscriber behavior at a cable provider.