Skip to main content

Getting Started: How to Set Up GA4 for Your Website

GA4 represents the latest evolution of Google Analytics, offering enhanced capabilities for comprehending market dynamics and customer interactions across diverse digital channels.

In this comprehensive guide, we will walk you through the process to set up GA4 for a website, enabling you to make the most of its capabilities and optimize your digital strategy.

Table Of Content

  1. What is Google Analytics 4 (GA4)?
  2. Benefits of Google Analytics 4
  3. Set up GA4 for a website
  4. Adding Properties to Google Analytics
  5. Add a data stream
  6. Setting Up Data Collection for Websites

What is Google Analytics 4 (GA4)?

Google Analytics 4

Google Analytics 4 (GA4) is the next generation of Google Analytics, a web and app analytics platform that provides insights into customer behavior. GA4 is a significant departure from Universal Analytics (UA), the previous version of Google Analytics. It is designed to be more privacy-focused and cross-platform, and it offers a number of new features and capabilities, including:

  • Cross-platform measurement: GA4 can track user behavior across websites and apps, giving you a more complete view of the customer journey.
  • Event-based data model: GA4 uses an event-based data model, which gives you more flexibility in how you track and measure user interactions.
  • Predictive analytics: GA4 offers a number of predictive analytics capabilities, such as customer lifetime value prediction and churn prediction.
  • Privacy-focused design: GA4 is designed with privacy in mind, and it offers a number of features to help you comply with privacy regulations, such as cookieless measurement and behavioral and conversion modeling.

Benefits of Google Analytics 4

The new version of Google Analytics is better as compared to its older version. Some of the key benefits of Google Analytics 4 are mentioned below

  1. Predictive Analytics: GA4 incorporates machine learning to offer predictive metrics. This enables you to anticipate user behavior and trends, helping you make informed decisions and optimize your marketing strategies.
  2. Audience Building: GA4 simplifies the process of creating custom audiences based on user characteristics and behavior. You can target these audiences more effectively in your marketing campaigns.
  3. Streamlined Reporting: GA4 offers a more intuitive and user-friendly interface for creating reports and dashboards. You can easily access the data that matters most to your business and share it with your team.
  4. Real-Time Data: Get real-time insights into user activity on your website or app. This feature is especially valuable for monitoring the performance of live events or marketing campaigns.
  5. Integration with Google BigQuery: GA4 seamlessly integrates with Google BigQuery, allowing you to perform advanced data analysis and extract valuable insights from your data.
  6. E-commerce Tracking: For online businesses, GA4 provides robust e-commerce tracking capabilities, helping you monitor sales, revenue, and product performance more effectively.

Set up GA4 for a website

The initial step in this process is to establish an Analytics account, unless you already possess one. Unless you wish to create a separate account for this website and/or app, you can proceed to creating a property. For instance, you might consider creating a new account if this website and/or app is associated with a different business.

Here’s how to get started:

  1. Visit Google Analytics Website – To begin, open a web browser and go to the website address https://analytics.google.com.
  2. New to Google Analytics – If you’ve never used Google Analytics before, you’ll find a section on the website that welcomes you. In that section, look for and click on the option that says “Start measuring.” This is where you initiate the setup process for tracking website data.
  3. Existing Analytics user – If you’ve previously used Google Analytics and have an account but want to create a new one for a different website or app, follow these steps:
    • Locate and click on the “Admin” section. You should see it on the Google Analytics website.
    • Within the “Admin” section, find the “Account” column. Click on it.
    • From there, select the option that says “Create Account.” This allows you to set up a separate Analytics account for your new website or app.
  4. Provide a name for your account – After selecting “Create Account,” you’ll be prompted to give a name to your new Analytics account. This name should help you easily identify which website or app it’s associated with. Additionally, you can set preferences for data sharing. This means you can decide what kind of information you want to share with Google. You have control over this.
  5. Click “Next” to proceed and add the first property to your account – Finally, click the “Next” button to move forward. This will take you to the next step, where you can add the first property to your newly created Analytics account. A “property” in this context typically represents a specific website or app that you want to track and analyze. So, by clicking “Next,” you’re progressing to the next stage of setting up your tracking for that website or app.
Create an Account in GA4

Create an Account in GA4

Adding Properties to Google Analytics

To add properties while set up GA4 for a website, you need the “Editor” role. If you’re the one who created the account, you automatically have this role.

Here’s how to create a property:

If you’re continuing from the “Create an Analytics account” step mentioned earlier, skip to step 2. Otherwise, follow these steps:

Property Creation

Creating a Property in GA4

Step 1 : Go to the “Admin” section, and in the “Account” column, ensure that you’ve selected the correct account you want to add a property to. Then, in the “Property” column, click “Create Property.”

Step 2: Give your property a name, like “My Business, Inc website.” Also, choose the reporting time zone and currency. It’s essential to note that if someone visits your website on a Tuesday in their time zone, but it’s still Monday in your time zone, Analytics will record it as a Monday visit.

    • If you select a time zone that follows Daylight Saving Time, Analytics will automatically adjust for time changes. However, if you prefer not to account for Daylight Saving Time changes, use Greenwich Mean Time.
    • Changing the time zone will only affect data going forward. If you change the time zone for an existing property, you might see a temporary flat spot or spike in your data due to the time shift. Report data may also reference the old time zone briefly until Analytics servers process the change.
    • We recommend changing the time zone for a property no more than once per day to allow Analytics to handle the change effectively.
Describe Your Business in GA4

Describe Your Business in GA4

Step 3: Click “Next” and select your industry category and business size.

Choose your Business Objectives

Choose your Business Objectives

Step 4 : Click “Next” again and specify how you intend to use Google Analytics.

    • Note: Google Analytics customizes its default reports based on the information you provide about your intended use. For example, if you choose to “Generate more leads,” you’ll see a set of reports designed to help you track lead generation.

Step 5: Finally, click “Create,” and if you’re setting up a new account, you’ll need to accept the Analytics Terms of Service and the Data Processing Amendment.

Now, you can proceed to add a data stream to start collecting data.

Add a data stream

Data Streams in GA4

Certainly, here are the instructions for adding a data stream to set up GA4 for a website / app with full explanations:

Adding a Data Stream

Step 1: Check Your Progress

If you’ve just completed the “Create a property” step mentioned earlier, you can skip to step 2. However, if you haven’t done that yet, follow these instructions:

Step 2: Navigate to the Admin Section

Go to the “Admin” section in your Google Analytics account. This is where you manage your account settings.

Step 3: Confirm Your Choices

Now, ensure that you’ve selected the correct account you want to work with. You can find this information in the “Account” column. Double-check that it’s the right one.

Next, look at the “Property” column to make sure you’ve selected the property (website or app) you want to set up data tracking for. Confirm that it’s the correct property.

Step 4: Access Data Streams

In the “Property” column, you’ll find an option called “Data Streams.” Click on it to access the data tracking settings.

Step 5: Add a New Data Stream

Within the “Data Streams” section, you’ll see an option to “Add stream.” Click on this to begin setting up a new data stream for your chosen property.

Step 6: Choose Your Platform

Now, you’ll need to specify which platform you want to track data from. You have three options:

  • iOS app: Select this if you want to track data from an iOS (Apple) mobile application.
  • Android app: Choose this option if you want to track data from an Android mobile application.
  • Web: Opt for this if you want to track data from a website.

Select the option that best matches your needs and the plat

Setting Up a Web Data Stream

Step 1: Begin by entering the URL of your main website. For example, you can type in something like “example.com.” Also, provide a name for this stream. For instance, you can name it “Example, Inc. (web stream).”

Step 2: You’ll come across an option to enable or disable “enhanced measurement.” Enhanced measurement automatically tracks various events on your website, including page views. Don’t worry; you can always go back later and turn off specific enhanced measurement events if you don’t want to collect them individually. We recommend enabling enhanced measurement at this stage.

Step 3: Once you’ve filled in the URL, stream name, and decided on enhanced measurement, click the “Create stream” button to create your web data stream.

Setting Up a iOS app or Android app Data Stream

When you create an app data stream, Google Analytics automatically sets up a corresponding Firebase project and app data stream. It also links the Firebase project to your property if they are not already connected.

Here are the steps to add an app data stream:

Step 1: Register Your App

  • Enter the iOS bundle ID or Android package name for your app, along with the app name. If it’s an iOS app, provide the App Store ID as well.
  • Click “Register app.”

Step 2: Download Configuration File

  • Click “Next” and then follow the instructions to download the configuration file specific to your app.

Step 3: Add Google Analytics for Firebase SDK

  • Click “Next” again and follow the instructions to incorporate the Google Analytics for Firebase SDK into your app.

Step 4: Verify Installation

  • Click “Next” once more.
  • Run your app to ensure that the SDK is installed correctly and that your app is communicating effectively with Google servers.

Step 5: Completion

  • Finally, click “Finish” to complete the setup process. Alternatively, you can choose to skip this step if you prefer to finish setting up your app at a later time.

Setting Up Data Collection for Websites

To start viewing data in your new Google Analytics 4 property, you’ll need to take one of the following steps:

Check Your Content Management System (CMS)

Many Content Management Systems (CMSs) offer built-in compatibility with Google Analytics 4. If you’re using one of the CMSs listed below, follow these instructions to locate your Google tag ID and insert it into the designated Google Analytics field provided by your CMS.

To find your Google tag (“G-“) ID:

  1. Go to Google Analytics and click on “Admin.”
  2. Ensure you’re in the right account and property.
  3. In the “Property” column, click on “Data streams.”
  4. Find the data stream for which you need the ID and click on it.
  5. In the “Google tag” section, click “Configure tag settings.”
  6. In the “Your Google tag” section, copy the ID that starts with “G-” or “AW-.”

By following these steps, you can set up data collection for your website and begin tracking important analytics in your Google Analytics 4 property.

Adding Your Google Tag to Your Website's HTML

If you are using a CMS or website builder that doesn’t provide a field to enter your Google tag ID, you’ll need to paste your Google tag into your website using your CMS’s custom HTML feature.

  1. Sign in to your Google Analytics account.
  2. Click Admin.
  3. At the top of the Property column, select your property.
  4. In the Property column, click Data streams > Web.
  5. Click the data stream for your website.
  6. Under Google tag, click View tag instructions.
  7. On the Installation instructions page, select Install manually:
    • On the screen, you’ll see the JavaScript snippet for your account’s Google tag. Your Google tag is the entire section of code that appears, beginning with:<!-- Google tag (gtag.js) -->and ending with</script>

Paste your Google tag to your website using your CMS’s custom HTML feature.

Data collection may take up to 30 minutes to begin. You can then use the Realtime report to verify that you’re receiving data.

New to Google Analytics 4? 

Visit our GA4 guide today and embark on a journey to data enlightenment. Let’s transform your online presence together