Fapvid Desk ·
Google Analytics 4 Setup Guide: Step-by-Step for 2026
Learn how to set up Google Analytics 4 in 2026. Step-by-step instructions for creating a property, adding a data stream, installing the tag, and verifying data.

Google Analytics 4 (GA4) is the current version of Google's analytics platform, and setting it up correctly is the first step to understanding your website traffic. This guide walks you through the entire GA4 setup process, from creating an account to verifying that data is flowing, with clear steps you can follow in about 30 minutes.
GA4 is used by 14.2 million websites, making it the most widely deployed analytics tool on the web. Unlike the old Universal Analytics, GA4 is event-based, which means it tracks user interactions as events rather than sessions. This change gives you more flexible and privacy-friendly reporting, but it also means the setup process is different.
By the end of this guide, you will have a working GA4 property, a data stream, and the tracking code installed on your site. You will also know how to verify that data collection is working and how to avoid the most common setup mistakes.
What do you need before you start the GA4 setup?
Before you begin, you need a Google account (such as Gmail) and access to your website's backend or content management system (CMS).
You do not need a paid plan. GA4 is free for standard use, and it includes up to 25 million events per month for a standard property. You also need to decide on your reporting time zone and currency, as these settings affect how data is recorded.
If you use a website builder like WordPress, Shopify, or Wix, you will need the ability to edit your site's code or use a plugin. Most CMS platforms have native GA4 integrations, which makes the process easier.
How do you create a Google Analytics 4 account?
Creating a GA4 account is the first official step, and it takes about five minutes.
- Go to analytics.google.com and sign in with your Google account.
- If this is your first time, click Start Measuring. If you already have an account, go to Admin and click Create, then select Property.
- Provide an account name (for example, your business name). Configure the data-sharing settings to control which data you share with Google.
- Click Next to add the first property to the account.
When you create a property, you will enter a property name (such as "My Business, Inc website"), select your reporting time zone and currency, and choose your industry category and business size. Google uses this information to tailor default reports. For example, if you choose "Generate more leads," you will see a collection of reports focused on lead generation.
After you accept the Terms of Service and the Data Processing Amendment, your property is created. You will then be prompted to add a data stream.
How do you add a data stream in GA4?
A data stream is the connection between your website or app and your GA4 property, and it is required for data collection.
In Admin, under Data collection and modification, click Data Streams. Then click Add stream and choose your platform: Web, iOS app, or Android app. For a standard website, choose Web.
Enter your website URL (for example, https://example.com) and a stream name (such as "Main Website"). You have the option to enable or disable enhanced measurement. Enhanced measurement automatically collects page views, scrolls, outbound clicks, and other events. It is enabled by default, and Google recommends keeping it on because you can disable individual events later.
Click Create stream. On the stream details page, you will see your Measurement ID, which starts with "G-" followed by ten characters (for example, G-XXXXXXXXXX). You will need this ID to install the tracking code.
How do you install the GA4 tracking code on your website?
Installing the tracking code is the step that actually starts data collection, and the method depends on your platform.
If your CMS has a native GA4 integration (such as Shopify, Wix, or WordPress with a plugin), you can simply paste your Measurement ID into the provided field. To find your Measurement ID, go to Admin, click Data Streams, select your web stream, and copy the ID under Stream Details.
If your CMS does not have a field for the Google tag ID, you need to paste the JavaScript snippet manually. On the stream details page, click View tag instructions, then select Install manually. Copy the entire Google tag snippet, which begins with <!-- Google tag (gtag.js) --> and ends with </script>. Paste it immediately after the <head> tag on every page of your website.
For sites using Google Tag Manager, add the Google Analytics: GA4 Configuration tag and enter your Measurement ID. This is often the cleanest method because it lets you manage all tags from one place.
Data collection may take up to 30 minutes to begin. You can use the Realtime report to verify that you are receiving data.
How do you verify that GA4 is collecting data?
After installing the tag, you should verify that data is flowing into your property.
Open the Realtime report (Reports > Realtime Overview or Reports > Realtime Pages). This report shows users on your site over the past 5 and 30 minutes, including their locations, traffic sources, and events. If you visit your own website after installing the tag, you should see yourself appear in the Realtime report within a few minutes.
You can also use DebugView in GA4 to see events as they are triggered in real time. This is especially useful for testing key events (conversions) before you rely on them for reporting.
If you do not see data, check that the tag is installed on all pages, that you copied the full snippet, and that your Measurement ID is correct. Also, clear your browser cache and test in an incognito window.
What settings should you configure after the basic setup?
Once the tag is installed and data is flowing, you should configure a few important settings to get accurate reports.
- Data retention: Set how long Google stores user-level data (2 or 14 months). The default is 2 months, but you may want 14 months for better analysis.
- Key events: Mark important actions (like form submissions or purchases) as key events so they appear as conversions in reports.
- Internal traffic filter: Exclude your own visits from reports by creating a data filter for internal IP addresses.
- Link Google Search Console: Connect GA4 to Google Search Console to see search queries and landing pages alongside your analytics data.
- Link Google Ads: If you run ads, link your Google Ads account to GA4 to see campaign performance and import conversions.
These settings are not required for basic data collection, but they improve the accuracy and usefulness of your reports.
What are the most common GA4 setup mistakes?
Avoiding common mistakes saves you from inaccurate data and wasted time.
- Installing the tag on only one page: The tag must be on every page of your site, not just the homepage.
- Using the wrong Measurement ID: Double-check that you copied the G- ID from the correct data stream.
- Forgetting to exclude internal traffic: Without a filter, your own visits pollute your data.
- Not setting up key events: Without key events, you cannot track conversions in GA4.
- Ignoring data retention: The default 2-month retention may be too short for long-term analysis.
- Not verifying with Realtime: Always confirm data collection before moving on.
By avoiding these mistakes, you ensure that your GA4 data is reliable from day one.
How long does it take to set up GA4?
The core setup takes about 30 minutes, including account creation, property setup, data stream creation, and tag installation.
Additional configuration, such as setting up key events, filters, and integrations, can take another hour or two. If you use a CMS with a native integration, the process is faster because you do not need to edit code manually.
Data collection begins within 30 minutes of installing the tag, but it may take up to 24 hours for standard reports to populate fully.
What is the difference between GA4 and Universal Analytics?
GA4 is event-based, while Universal Analytics was session-based. This is the fundamental difference that affects how data is collected and reported.
In Universal Analytics, a session was a group of interactions within a time frame. In GA4, every interaction is an event, and sessions are derived from events. This makes GA4 more flexible and better suited for cross-platform tracking (website and app).
Universal Analytics stopped processing data on July 1, 2023, so GA4 is now the only standard version of Google Analytics. If you still have old UA data, you need to export it before it is deleted.
Do you need a paid plan for GA4?
No, GA4 is free for standard use. The free version includes up to 25 million events per month, which is sufficient for most small and medium-sized websites.
If you exceed that limit, you can upgrade to Google Analytics 360, which is a paid enterprise product. GA360 offers higher event limits, more advanced features, and dedicated support, but it is not necessary for most users.
Can you use GA4 with a website builder like WordPress or Shopify?
Yes, GA4 works with all major website builders and CMS platforms, including WordPress, Shopify, Wix, and Squarespace.
Most of these platforms have native GA4 integrations. For example, Shopify has a Google & YouTube channel app that lets you connect GA4 without editing code. WordPress users can use plugins like Site Kit by Google or insert the tag manually. Wix has a built-in Google Analytics field in its dashboard.
If your platform does not have a native integration, you can always paste the Google tag into the custom HTML section of your site.
How do you link GA4 to Google Search Console?
Linking GA4 to Google Search Console gives you search query data directly in your analytics reports.
In GA4, go to Admin, then under Product Links, click Search Console Links. Click Link, select your property, and choose the web stream you want to associate. Then click Save.
Once linked, you will see Search Console reports under Reports > Acquisition > Search Console. This data includes queries, impressions, clicks, and average position.
What is enhanced measurement in GA4?
Enhanced measurement is a feature that automatically tracks certain user interactions without requiring custom code.
When enabled, GA4 automatically collects page views, scrolls, outbound clicks, site search, video engagement, and file downloads. It is enabled by default when you create a web data stream.
You can disable individual events later if you do not want to collect them. For example, if you do not want to track video engagement, you can turn that off in the data stream settings.
How do you set up key events (conversions) in GA4?
Key events are the actions you care about most, such as purchases, form submissions, or newsletter signups.
To mark an event as a key event, go to Admin, then under Data displays, click Key events. Click New key event, enter the event name (for example, "purchase" or "generate_lead"), and click Create.
You can also mark an event as a key event directly from the Realtime report or from the Events report by clicking the three-dot menu next to the event.
How do you exclude internal traffic in GA4?
To exclude internal traffic, you create a data filter based on your IP address.
First, find your public IP address (search "what is my IP" in Google). Then in GA4, go to Admin, under Data collection and modification, click Data Streams. Select your web stream, scroll to More tagging settings, and click Define internal traffic. Add a rule with your IP address and click Create.
Next, go to Admin, under Data collection and modification, click Data Filters. Create a new filter, select Internal traffic, choose Exclude, and set the filter to Active. This prevents your own visits from appearing in reports.
How do you set data retention in GA4?
Data retention controls how long Google stores user-level data (such as cookies and user IDs).
Go to Admin, under Data collection and modification, click Data Retention. Choose either 2 months or 14 months. The default is 2 months, but if you want to analyze long-term user behavior, select 14 months.
Note that changing data retention does not affect aggregated reports, which are based on event data that is stored longer.
How do you use DebugView to test GA4?
DebugView is a tool that shows events in real time as they are triggered on your site.
To use it, open GA4 and go to Admin, then under Data collection and modification, click DebugView. Then visit your website with the Google Tag Assistant browser extension enabled, or use the GA4 DebugView mode in your browser.
You will see a live stream of events, including page_view, scroll, and any custom events you have set up. This is the best way to verify that your tracking is working correctly before you rely on the data.
What are the benefits of using GA4 for your business?
GA4 offers several advantages over older analytics tools, including cross-platform tracking, event-based data, and more advanced reporting features.
With GA4, you can track both website and app data in the same property, which is essential for businesses with a mobile app. The event-based model gives you more flexibility to measure custom interactions without writing complex code.
GA4 also includes machine learning insights, such as predictive metrics and anomaly detection, which can help you identify trends and opportunities. And because it is designed for privacy, it works better with cookie consent and data protection regulations.
How do you troubleshoot common GA4 data collection issues?
If you are not seeing data in GA4, there are a few common causes to check.
- Tag not installed on all pages: Use a browser extension like Google Tag Assistant to check which pages have the tag.
- Wrong Measurement ID: Verify that the G- ID in your tag matches the one in your data stream.
- Ad blocker: Some ad blockers block Google Analytics scripts. Test in an incognito window with the blocker disabled.
- Data not processed yet: It can take up to 30 minutes for data to appear in Realtime reports.
- Filter excluding your traffic: If you set up an internal traffic filter, make sure it is not too broad.
If you have checked all of these and still see no data, use DebugView to see if events are being sent. If DebugView shows events, the issue is likely with your reports or filters.
What is the best way to learn GA4 after setup?
After completing the setup, the best way to learn GA4 is to explore the reports and experiment with the interface.
Start with the Realtime report to see live data, then move to the Acquisition reports to understand where your traffic comes from. Use the Explorations feature to create custom reports and analyze user behavior in depth.
Google also offers free GA4 training courses through the Google Analytics Academy, which cover everything from basic setup to advanced analysis. These courses are a great way to build your skills.
How does GA4 handle privacy and consent?
GA4 is designed with privacy in mind, and it includes features to help you comply with data protection regulations like GDPR and CCPA.
GA4 does not store IP addresses by default, and it offers granular controls for data collection and retention. You can also enable consent mode, which adjusts how Google tags behave based on user consent choices.
If you use a consent management platform (CMP), you can integrate it with GA4 to ensure that you only collect data from users who have given consent.
What is the future of Google Analytics?
GA4 is the current and future version of Google Analytics, and Google has committed to ongoing development and improvements.
Google continues to add new features, such as advanced machine learning insights and more integration options. As privacy regulations evolve, GA4 will likely become even more privacy-centric.
For now, GA4 is the standard, and mastering it is essential for anyone who wants to understand their website's performance.
Frequently asked questions
Is Google Analytics 4 free?
Yes, GA4 is free for standard use, with up to 25 million events per month. The paid version, GA360, is for enterprise users with higher data needs.
How long does it take for GA4 data to appear?
Data collection begins within 30 minutes of installing the tag. Realtime reports show data almost immediately, while standard reports may take up to 24 hours to populate.
Do I need to use Google Tag Manager to set up GA4?
No, you can install the GA4 tag directly on your website. Google Tag Manager is an optional tool that makes tag management easier, especially for sites with many tags.
Can I use GA4 with a website builder like Wix or Shopify?
Yes, all major website builders have native GA4 integrations or allow you to paste the tracking code manually.
What is the difference between a property and a data stream in GA4?
A property is your overall analytics container (for example, your business). A data stream is a specific source of data, such as a website or an app, that feeds into the property.
How do I find my GA4 Measurement ID?
Go to Admin, click Data Streams, select your web stream, and copy the Measurement ID under Stream Details. It starts with "G-".
What are key events in GA4?
Key events are the actions you care about most, such as purchases or form submissions. You mark them as key events to track conversions in reports.
How do I exclude my own visits from GA4?
Create an internal traffic filter using your IP address. Go to Admin, Data Streams, then More tagging settings, and Define internal traffic. Then create a data filter set to Exclude.
What is enhanced measurement in GA4?
Enhanced measurement automatically tracks interactions like page views, scrolls, outbound clicks, and video engagement without custom code. It is enabled by default.
How do I link GA4 to Google Search Console?
Go to Admin, under Product Links, click Search Console Links, then Link. Select your property and web stream, and save.
Updated 2026