How to Setup Google Analytics 4 on Your Website
Google Analytics 4 (GA4) is the next generation of analytics that collects event-based data from both websites and apps. The data is used to better understand the customer journey. It can track user's behavior that led to purchases and use that data to make informed decisions about how to reach new and existing customers. In this blog post we would go over how to set up GA4 on your website.

Jordan Wu
5 min·Posted

Table of Contents
Understanding Google Analytics Hierarchy
Google Analytics is organized in the following hierarchy:
- Organization (optional)
- Analytics account
- Analytics property
- Analytics account
Organization is the topmost and optional level of a Google Analytics hierarchy. This allows products and users to be collected together in organizations and each organization may have multiple Analytics accounts.
An Account is required to access your Analytics properties. You can have one or more Analytics accounts (up to a maximum of 100). Each account can contain up to 2,000 properties. For best practice you should set up one account per company and one property per business unit.
A Property represents a grouping of data from a website and/or app in Google Analytics. Within a property, you can view reports and manage data collection. One property is called Google Analytics 4 and is the property you are going to be setting up for your account.
Google Analytics 4 property collect data through Data streams. A flow of data from your website or app to Google Analytics. There are 3 types of data stream: Web, iOS, and Android. It's recommended to have one type of data stream per property. For example, 1 web data stream per property.
Create an Analytics Account
- Go to https://analytics.google.com.
- In Admin, click Create, then select Account.
- Provide an account name. Configure the data-sharing settings to control which data you share with Google.
- Click Next to add the first property to the account.

Create a New Google Analytics 4 Property
- Enter a name for the property (e.g. "My Business, Inc website") and select the reporting time zone and currency. If a visitor comes to your website on a Tuesday in their time zone, but it's Monday in your time zone, the visit is recorded as having occurred on Monday.
- Click Next. Select your industry category and business size.
- Click Next. Select how you intend to use Google Analytics.
- Click Create and (if you are setting up a new account) accept the Analytics Terms of Service and the Data Processing Amendment.
- Continue to Add a data stream to start collecting data.
Add a Data Stream
- Click Web as your platform.
- Enter the URL of your primary website, e.g., "example.com", and a Stream name, e.g. "Example, Inc. (web stream)".
- Enhanced measurement automatically collects page views and other events. So, you recommend that you enable enhanced measurement.
- Click Create stream.
- click View tag instructions.

- Many CMSs have native integrations with Google Analytics 4. Check if your CMS lets you enter your Google tag ID. Otherwise for all other websites pick install manually.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GOOGLE_TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag('js', new Date())
gtag('config', 'GOOGLE_TAG_ID')
</script>
When installing manually be sure to copy and paste your Google tag immediately after the head
HTML element on each page of your website. Data collection may take up to 30 minutes to begin. You can then use the Realtime report to verify that you're receiving data.
Defining Digital Analytics
In marketing, you have the concept of a purchase funnel. There are different stages within the funnel that describe customer interactions.

Acquisition involves building awareness and acquiring user interest. Behavior is when users engage with your business. Conversion is when a user becomes a customer and transacts with your business. The data you are sending to your GA4 property is used to create pre-made reports. You can check them out at Google Analytics reports. That's everything you would need to setup your website with GA4 and start generating pre-made reports!