How to Set Up Google Analytics 4: Everything You Need to Know
If you have been putting off setting up Google Analytics 4 (GA4), now is the time to act. Universal Analytics has been fully sunset, and GA4 is the only game in town for website and app analytics powered by Google.
Whether you are starting from scratch or still trying to make sense of the transition, this guide walks you through every single step of the GA4 setup process. We cover creating your property, adding data streams, installing the tracking code, configuring basic event tracking, and the most common mistakes that trip people up.
Let us get started.
What Is Google Analytics 4 and Why Does It Matter?
Google Analytics 4 is Google’s current analytics platform. It replaced Universal Analytics (UA) and introduced a fundamentally different approach to data collection and reporting.
Here are the key differences you should understand before setup:
| Feature | Universal Analytics | Google Analytics 4 |
|---|---|---|
| Data Model | Session-based | Event-based |
| Cross-Platform Tracking | Limited | Built-in (web + app) |
| Privacy Controls | Basic | Advanced (cookieless modeling) |
| Reporting | Pre-built reports | Customizable Explorations |
| Machine Learning | Minimal | Predictive metrics and insights |
The bottom line: GA4 gives you a more flexible, privacy-friendly, and future-proof analytics setup. But the interface and configuration process are different from what you may be used to.
Prerequisites Before You Begin
Before diving into the setup, make sure you have the following ready:
- A Google account (Gmail or Google Workspace)
- Access to your website’s code or CMS (WordPress, Shopify, Wix, etc.)
- Admin-level access if you already have a Google Analytics account
- Optional but recommended: a Google Tag Manager (GTM) account
Got all that? Good. Let us walk through the process step by step.
Step 1: Create a Google Analytics Account
If you already have a Google Analytics account, you can skip to Step 2. If not, follow these instructions:
- Go to analytics.google.com
- Sign in with your Google account
- Click Start measuring
- Enter your Account name (this is typically your company or business name)
- Configure your Account Data Sharing Settings. We recommend keeping the defaults enabled, but review each option based on your privacy policy.
- Click Next
Tip: Your account name is an organizational label. One account can hold multiple properties, so name it after your business or client, not a specific website.
Step 2: Create a GA4 Property
This is where things get specific to GA4. A property represents a website or app (or both) that you want to track.
- Enter a Property name (e.g., “My Company Website”)
- Select your Reporting time zone. Choose the time zone where your business operates.
- Select your Currency.
- Click Next
- Fill in your Business details: industry category and business size.
- Click Next
- Choose your Business objectives. GA4 will customize your default reports based on what you select here. Options include:
- Generate leads
- Drive online sales
- Raise brand awareness
- Examine user behavior
- Get baseline reports (select this if you are unsure)
- Click Create
- Accept the Terms of Service
Your GA4 property is now created. Next, you need to tell it where your data will come from.
Step 3: Set Up a Data Stream
A data stream is the connection between your website (or app) and your GA4 property. For most marketers, you will start with a Web data stream.
Creating a Web Data Stream
- After creating your property, you will be prompted to choose a platform. Select Web.
- Enter your Website URL (e.g., amitindesign.com)
- Enter a Stream name (e.g., “Main Website”)
- Make sure Enhanced measurement is toggled ON. This automatically tracks key events like page views, scrolls, outbound clicks, site search, video engagement, and file downloads.
- Click Create stream
Understanding Enhanced Measurement
Enhanced measurement is one of GA4’s best features. With it enabled, the following events are tracked automatically without any extra code:
- Page views (page_view)
- Scrolls (scroll) – fires when a user reaches 90% of the page
- Outbound clicks (click) – tracks clicks to external domains
- Site search (view_search_results)
- Video engagement (video_start, video_progress, video_complete)
- File downloads (file_download)
You can toggle individual events on or off by clicking the gear icon next to Enhanced measurement.
Locating Your Measurement ID
After creating your data stream, you will see a Measurement ID that looks like G-XXXXXXXXXX. You will need this ID for the installation step. Keep this page open or copy the ID somewhere safe.
Step 4: Install the GA4 Tracking Code on Your Website
Now for the critical part: getting the tracking code onto your site. There are three main methods to do this. Choose the one that fits your technical setup.
Method 1: Install Directly via Google Tag (gtag.js)
This is the simplest method if you have direct access to your website’s HTML.
- In your GA4 data stream settings, click View tag instructions
- Select Install manually
- Copy the provided JavaScript snippet
- Paste it into the
<head>section of every page on your website, as high up as possible
The code will look something like this:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
Replace G-XXXXXXXXXX with your actual Measurement ID.
Method 2: Install via Google Tag Manager (Recommended)
This is the method we recommend at Amit In Design for most businesses. Google Tag Manager gives you flexibility to manage all your tags in one place without editing site code every time.
- Log in to tagmanager.google.com
- Select your container (or create one if you do not have one yet)
- Click Tags in the left menu, then New
- Name your tag (e.g., “GA4 Configuration”)
- Click Tag Configuration and select Google Tag
- Enter your Measurement ID (G-XXXXXXXXXX)
- Under Triggering, select All Pages
- Click Save
- Click Submit in the top right to publish your changes
Important: Make sure the GTM container snippet is already installed on your website. If it is not, you will need to add the GTM code to your site’s <head> and <body> sections first.
Method 3: Install via a CMS Plugin
If you use WordPress, Shopify, Wix, Squarespace, or another CMS, there are built-in integrations or plugins that make this easier.
For WordPress:
- Use a plugin like Site Kit by Google (official Google plugin) or MonsterInsights
- Install and activate the plugin
- Connect your Google account
- Select your GA4 property
- The plugin handles the code insertion automatically
For Shopify:
- Go to Online Store > Preferences
- Paste your Measurement ID in the Google Analytics field
- Alternatively, add the gtag.js snippet to your theme’s
theme.liquidfile
For Wix:
- Go to Marketing & SEO > Marketing Integrations
- Click Connect under Google Analytics
- Enter your Measurement ID
Step 5: Verify Your Installation
Before you move on, you need to confirm that data is actually flowing into your GA4 property. Here is how:
Use the Realtime Report
- Open your website in a browser
- In Google Analytics, go to Reports > Realtime
- You should see at least one active user (that is you)
- If you see activity, your installation is working
Use the DebugView
- Install the Google Analytics Debugger Chrome extension
- Enable it and visit your website
- In GA4, go to Admin > DebugView
- You will see events appearing in real time with detailed parameters
If you do not see any data after 24 to 48 hours, revisit the installation steps. The most common issue is the tracking code not being placed correctly in the <head> section.
Step 6: Configure Basic Event Tracking
GA4 tracks everything as events. Some events are collected automatically, some through enhanced measurement, and others you need to set up yourself.
Types of Events in GA4
| Event Type | Description | Examples |
|---|---|---|
| Automatically collected | Tracked by default when GA4 code is installed | first_visit, session_start, user_engagement |
| Enhanced measurement | Tracked when enhanced measurement is on | page_view, scroll, click, file_download |
| Recommended events | Google-suggested events you implement manually | login, sign_up, purchase, add_to_cart |
| Custom events | Events unique to your business that you define | newsletter_signup, quote_request, tool_usage |
Creating a Custom Event in GA4 Interface
- Go to Admin > Events
- Click Create event
- Click Create
- Name your event (use snake_case, e.g., contact_form_submit)
- Set matching conditions. For example, if you want to track when someone views your contact page:
- Parameter: event_name equals page_view
- Parameter: page_location contains /contact
- Click Create
Creating Custom Events via Google Tag Manager
For more complex tracking (button clicks, form submissions, scroll depth), GTM gives you greater control:
- In GTM, create a new Tag using the Google Analytics: GA4 Event tag type
- Enter your Measurement ID
- Enter the Event Name
- Add any Event Parameters you need
- Set a Trigger (e.g., form submission, specific button click)
- Save and publish
Step 7: Set Up Conversions
In GA4, conversions are simply events that you mark as important. There is no separate “Goals” section like in Universal Analytics.
- Go to Admin > Events
- Find the event you want to mark as a conversion
- Toggle the Mark as conversion switch to ON
Alternatively, go to Admin > Conversions and click New conversion event, then type in the exact event name.
Common conversions to set up:
- Form submissions (contact_form_submit, quote_request)
- Purchases (purchase)
- Sign-ups (sign_up)
- Phone number clicks (click with specific link parameters)
- Newsletter subscriptions
Step 8: Link Google Services
To get the most out of GA4, connect it to your other Google tools.
Link Google Ads
- Go to Admin > Product links > Google Ads links
- Click Link
- Select your Google Ads account
- Enable personalized advertising (if applicable)
- Click Submit
Link Google Search Console
- Go to Admin > Product links > Search Console links
- Click Link
- Select your Search Console property
- Select your GA4 web data stream
- Click Submit
This gives you access to organic search queries, landing page performance, and more directly within your GA4 reports.
Step 9: Adjust Data Retention Settings
By default, GA4 retains detailed event data for 2 months. If you want to analyze data over longer periods in the Explorations section, you should change this.
- Go to Admin > Data Settings > Data Retention
- Change Event data retention to 14 months
- Click Save
Note: This setting only affects Explorations and custom reports. Standard reports use aggregated data and are not affected by this retention period.
Common GA4 Setup Mistakes to Avoid
We have helped dozens of clients at Amit In Design set up or fix their GA4 implementations. These are the most frequent mistakes we see:
1. Duplicate Tracking Code
This happens when you install the GA4 tag both directly on your site AND through Google Tag Manager. The result is inflated page views and inaccurate session data. Choose one method and stick with it.
2. Not Enabling Enhanced Measurement
Some users disable enhanced measurement during setup without realizing it. This means they miss out on automatic scroll, click, and video tracking. Always verify it is toggled on in your data stream settings.
3. Forgetting to Set Up Conversions
GA4 does not track conversions by default (apart from purchase events in some setups). If you do not explicitly mark events as conversions, you will have no conversion data in your reports.
4. Using the Wrong Measurement ID
Your GA4 Measurement ID starts with G-. If you are accidentally using a UA ID (starting with UA-), your data will not appear in GA4. Double-check your ID in the data stream settings.
5. Ignoring Internal Traffic Filters
Your own visits to the site can skew the data. Set up an internal traffic filter:
- Go to Admin > Data Streams, select your stream
- Click Configure tag settings > Show all > Define internal traffic
- Add a rule with your office IP address
- Then go to Admin > Data Settings > Data Filters and activate the filter
6. Not Adjusting Data Retention
The default 2-month retention limit catches many marketers off guard when they try to run year-over-year comparisons in Explorations. Change it to 14 months as described in Step 9.
7. Skipping Cross-Domain Tracking
If your users move between multiple domains (e.g., your main site and a separate checkout domain), you need to configure cross-domain tracking. Without it, sessions will break and your data will be fragmented.
- Go to Admin > Data Streams and select your stream
- Click Configure tag settings > Show all > Configure your domains
- Add all relevant domains
GA4 Setup Checklist
Use this quick-reference checklist to make sure you have covered everything:
- ☑ Google Analytics account created
- ☑ GA4 property created with correct time zone and currency
- ☑ Web data stream configured
- ☑ Enhanced measurement enabled
- ☑ Tracking code installed (via gtag.js, GTM, or CMS plugin)
- ☑ Installation verified via Realtime report or DebugView
- ☑ Key events created and marked as conversions
- ☑ Google Ads linked (if running paid campaigns)
- ☑ Google Search Console linked
- ☑ Data retention set to 14 months
- ☑ Internal traffic filter configured
- ☑ Cross-domain tracking set up (if applicable)
What to Do After GA4 Is Set Up
Once your basic setup is complete, here are the next steps to get real value from your analytics:
- Create custom audiences for remarketing campaigns
- Build custom reports using the Explorations feature
- Set up Google Looker Studio dashboards connected to GA4 for visual reporting
- Enable Google Signals for cross-device tracking (Admin > Data Settings > Data Collection)
- Explore the predictive metrics like purchase probability and churn probability
- Regularly audit your event tracking to ensure data quality
Frequently Asked Questions
Is Google Analytics 4 free?
Yes. Google Analytics 4 is completely free for standard use. There is also a paid enterprise version called Google Analytics 360, but the free version is more than sufficient for most businesses.
How long does it take for GA4 to start showing data?
Realtime reports show data within seconds of installation. Standard reports may take 24 to 48 hours to populate fully.
Can I use both Google Tag Manager and the gtag.js snippet?
Technically yes, but you should not install the GA4 tag through both methods at the same time. This causes duplicate data collection. Pick one method: either GTM or the direct code snippet.
What is the difference between GA4 and Universal Analytics?
GA4 uses an event-based data model instead of session-based. It offers better cross-platform tracking, built-in privacy features, and machine learning capabilities. Universal Analytics was discontinued in 2024, so GA4 is now the standard.
Do I need Google Tag Manager to use GA4?
No, GTM is optional. You can install GA4 directly using the gtag.js code snippet or through CMS plugins. However, GTM makes it much easier to manage tags and set up advanced event tracking without touching your website code.
How do I find my GA4 Measurement ID?
Go to Admin > Data Streams, click on your web stream, and you will see the Measurement ID at the top. It starts with G- followed by a string of characters.
Can I track multiple websites with one GA4 property?
You can add multiple data streams to one property, but Google recommends using separate properties for separate websites unless they are closely related (like different language versions of the same site). Separate properties keep your data cleaner.
Final Thoughts
Setting up Google Analytics 4 correctly from the start saves you from data gaps, inaccurate reporting, and headaches down the line. While GA4 has a steeper learning curve compared to Universal Analytics, the payoff is a more powerful and flexible analytics platform.
Follow the steps in this guide, use the checklist to verify your setup, and avoid the common mistakes we outlined. If you need help with your GA4 implementation or want a professional audit of your current setup, the team at Amit In Design is here to help.
Get your analytics right, and every marketing decision you make will be backed by reliable data.

