What is Google Analytics 4 Setup?

Cody Schneider

Setting up Google Analytics 4 can feel like a complex, technical chore, but it's the single most important step for understanding how users find and interact with your website. This guide provides a straightforward walkthrough of how to set up GA4, whether you're starting from scratch or moving from an older version. We'll also cover the essential configurations you need to get accurate, valuable data from day one.

What is Google Analytics 4?

Google Analytics 4, or GA4, is the latest version of Google's free web analytics platform. It represents a significant shift from its predecessor, Universal Analytics (UA). While UA was built around the idea of "sessions" and "pageviews," GA4 is designed for the modern web with an "event-based" model that tracks user interactions more flexibly across both websites and apps.

Think of it like this: In Universal Analytics, a user visit was like a container (the session), and everything you put inside it were pageviews. In GA4, everything is an "event." A page view is an event. Clicking a button is an event. Filling out a form is an event. Scrolling down a page is an event. This model gives you a much richer, more granular view of the complete user journey, not just which pages they visited.

Key Differences Between GA4 and Universal Analytics

  • Event-Based Model: As mentioned, nearly every interaction is captured as an event, offering more detailed insights than UA's session-based model.

  • Cross-Device Tracking: GA4 is better equipped to measure a single user's journey across multiple devices (like their phone and laptop) to provide a unified story.

  • Built-in Privacy Features: GA4 was designed with privacy in mind, offering features like IP address anonymization by default to help you comply with regulations like GDPR.

  • Predictive Analytics: Using AI and machine learning, GA4 can provide predictive metrics, such as purchase probability and churn probability, to help you anticipate user actions.

Why You Need GA4 Set Up Correctly

If you're still thinking about your old Universal Analytics account, it's time to move on completely. Google officially stopped processing new data in standard Universal Analytics properties on July 1, 2023. This means your old UA property is no longer collecting any information about your current website traffic. All historical data will also be deleted at some point.

Google Analytics 4 is now the standard. Every day that goes by without a properly configured GA4 property is a day of lost data. Setting it up correctly ensures you are collecting the critical information you need to:

  • Understand which marketing channels are driving traffic and sales.

  • Identify your most popular content and pages.

  • Discover where users are dropping off in your sales funnel.

  • Make data-backed decisions to grow your business.

How to Set Up a Google Analytics 4 Property

The setup process varies slightly depending on whether you're brand new to Google Analytics or if you have an old Universal Analytics account. We’ll cover both scenarios.

Scenario 1: You're Completely New to Google Analytics

If you've never used Google Analytics before, you'll be creating a new account and a GA4 property at the same time. It's a quick process.

  1. Go to the Google Analytics website. Navigate to the Google Analytics marketing page and click "Start measuring." You'll be prompted to sign in with your Google account.

  2. Create an Account. The first step is to create an "Account." This is the top-level container for your analytics. Give it a name related to your business (e.g., "My Web Design Co"). Configure your data-sharing settings as you see fit and click "Next."

  3. Create a Property. Now, you'll create your GA4 Property. A property represents your website or app.

    • Property name: Enter your website’s name (e.g., "mywebdesignco.com").

    • Reporting time zone: Select your local time zone.

    • Currency: Choose the currency you use for business transactions.

    Click "Next."

  4. Provide Business Details. Answer the few questions about your industry and business size. This helps Google tailor your experience. Click "Create" and accept the terms of service.

  5. Set up your Data Stream. A "data stream" is the source of data for your property. Since you're setting this up for a website, click "Web." Enter your website URL (e.g., www.mywebdesignco.com) and give the stream a name (usually just your website name is fine). Ensure "Enhanced Measurement" is turned on - this automatically tracks events like page views, scrolls, and outbound clicks for you. Click "Create stream."

Once you create the stream, you'll see a page with your "Measurement ID" (which looks like G-XXXXXXXXXX). Keep this page open, you'll need this ID for the next steps.

Scenario 2: Upgrading from Universal Analytics

If you have an old Universal Analytics property, Google makes it easy to create a corresponding GA4 property using the GA4 Setup Assistant.

Important Note: The Setup Assistant does not automatically add the new GA4 tracking code to your website. It simply creates the GA4 property for you and tries to copy over some basic settings. You will still need to manually install the new tag, as shown in the next section.

  1. Log in to your Google Analytics account and make sure you're viewing your Universal Analytics property.

  2. Click on Admin (the gear icon on the bottom-left).

  3. In the "Property" column, you should see an option called GA4 Setup Assistant. Click on it.

  4. You'll see a box that says "I want to create a new Google Analytics 4 property." Click the blue Get Started button.

  5. A popup will appear explaining what will happen. Simply click Create and continue.

The assistant will now create your brand new GA4 property. Once it's done, click "Go to your GA4 property." You'll then need to find your new Measurement ID to install the tag on your site.

Installing the GA4 Tracking Tag on Your Website

Just creating the property isn't enough, you need to add its tracking code (or tag) to your website so it can start collecting data. Here are the three most common methods, from easiest to most advanced.

Method 1: Using a Platform Integration (The Easiest Way)

Most modern website builders and CMS platforms have a dedicated spot to paste your GA4 Measurement ID. This is the simplest method if your platform supports it.

  • Shopify: Go to Online Store > Preferences. Find the "Google Analytics" section and paste your Measurement ID.

  • WordPress: The easiest way is with a plugin. Install Google's official Site Kit plugin or another popular analytics plugin. They will connect your account and add the code for you.

  • Wix & Squarespace: Go to the Marketing > SEO settings (or similar area) in your admin panel. There will be an integrations section where you can connect Google Analytics by pasting your ID.

Method 2: Using Google Tag Manager (The Recommended Way)

Google Tag Manager (GTM) is a free tool that acts as a container for all your marketing and analytics tags. While it adds a small learning curve, it's the most flexible and future-proof method.

  1. In GTM, create a new Tag. Name it something like "GA4 - Configuration Tag."

  2. For the "Tag Configuration," choose Google Analytics: GA4 Configuration.

  3. In the "Measurement ID" field, paste your G-XXXXXXXXXX ID.

  4. Next, for "Triggering," choose the All Pages - Page View trigger. This tells GTM to fire the GA4 tag on every page of your website.

  5. Save your tag and click the blue Submit button in the top-right corner to publish your changes.

Method 3: Adding the Code Manually (The Direct Way)

If you're comfortable with code and don't use a platform or GTM, you can add the tag directly to your website's HTML.

  1. From your GA4 Data Stream details page, find the section called "Google tag" and click "View tag instructions".

  2. Select the "Install manually" tab. You'll see a snippet of JavaScript code.

  3. Copy this entire code snippet.

  4. Paste it immediately after the <head> tag on every single page of your website. If you're using a theme with a header template file, that's often the best place for it.

Essential Post-Setup Configurations

Once your tag is installed, there are a few crucial settings to configure inside GA4 to ensure you're collecting clean, useful data.

1. Set Your Data Retention Period

By default, GA4 only stores granular user-level data for 2 months. You should immediately change this to the maximum of 14 months.

  • Go to Admin > Data Settings > Data Retention.

  • Change the "Event data retention" dropdown from "2 months" to "14 months" and click Save.

2. Define Your Website Conversions

What is the most important action you want users to take? Submit a form? Make a purchase? In GA4, these are called "conversions." You can't just create them from scratch like in UA, you must first have an event and then mark that event as a conversion.

  • Go to Admin > Data display > Events.

  • You'll see a list of all the events GA4 is collecting. Find the event you want to track as a goal (e.g., generate_lead, purchase, or even the built-in form_submit).

  • Toggle the switch in the "Mark as conversion" column for that event. Easy as that.

3. Exclude Internal Traffic

To avoid skewing your data with visits from yourself or your team, you should filter out your office or home IP address.

  • Go to Admin > Data Streams and click on your web stream.

  • Under "Google Tag," select Configure tag settings.

  • Click Show all, then choose Define internal traffic.

  • Click Create. Define a rule name (e.g., "Office IP") and enter your IP address(es). You can find your IP address by Googling "what is my IP."

  • Last step: Head to Admin > Data Settings > Data Filters. You will see a filter named "Internal Traffic." Click on it, change its state from "Testing" to "Active," and save.

4. Verify Your Setup with the Real-time Report

Now for the satisfying part! To make sure everything is working, open a new tab and visit your own website. Then, back in your GA4 property, go to Reports > Real-time. If everything is configured correctly, within a minute you should see at least 1 user show up on the map. You can click around your website to see the page view and other events appear in the real-time report, confirming that Google Analytics is successfully tracking your activity.

Final Thoughts

Setting up Google Analytics 4 correctly is the foundational step toward understanding your users and marketing performance. By creating your property, installing the tag, and configuring these key settings, you've now established a reliable system for collecting the data you need to grow your business.

Once your data starts flowing into GA4, the next hurdle is making sense of it all. This is where we built our product to help. With Graphed, we connect directly to your Google Analytics 4 data and allow you to build custom dashboards and get answers just by asking questions. Instead of trying to find the right report in an unfamiliar interface, you can just ask, "Show me traffic and conversions from my Google Ads campaigns," and get an instant visualization, giving back hours of your week previously spent on manual analysis.