How to set up Google Analytics 4 from scratch
Learn how to set up Google Analytics 4 (GA4) correctly from scratch, covering accounts, properties, data streams, and tracking tags.
Quick summary
- Setting up GA4 correctly ensures you track the full customer journey from visit to purchase.
- You must create an account, configure a property, set up a web data stream, and install the Google tag.
- Always verify your installation using the GA4 Realtime report after waiting up to 30 minutes.
In practice, what I see is that many business owners struggle to understand how their website traffic turns into revenue because their analytics are configured incorrectly. Setting up Google Analytics 4 (GA4) correctly is the foundational step for any digital marketing effort. Without reliable data, you are essentially flying blind when spending money on ads.
GA4 is the primary analytics tool provided by Google to measure website and app activity. It helps you understand the full customer journey, from the first visit to a final purchase, at no financial cost.
Before you start
Before you dive into the setup process, you need to make sure you have the right access in place. You will need a standard Google Account to sign in. Depending on the actions you take, certain permissions are required. You must have a Viewer role or above at the account level to create an Analytics account, and an Editor role or above to add properties or data streams.
You also need admin access to your website builder, Content Management System (CMS like Shopify or WordPress), or direct access to your website’s HTML code so you can install the tracking tags later.
Step by step
Setting up your analytics environment requires following a precise sequence. Follow these steps carefully to ensure your data collects properly.
- Sign in to your Google Account. If this is your first time using the platform, click Start Measuring. If you already have an account and want to create a separate one for a different business, go to Admin and click Create, then select Account. Provide an account name and configure your data-sharing settings.
- Click Next to add your first property (a container for your website or app data). If you are continuing from the account creation step, you will move straight here. Otherwise, go to Admin, click Create, and select Property. You need the Editor role for this step.
- Enter a descriptive name for the property, such as your business name and website. Select your reporting time zone and your preferred currency. Note that changing your time zone later only affects data going forward and can cause temporary flat spots or spikes in your reporting.
- Click Next, select your industry category and business size, and then click Next again. Choose how you intend to use Google Analytics, such as generating more leads, so the platform can tailor default reports to your specific goals.
- Click Create. If you are setting up a new account, accept the Analytics Terms of Service and the Data Processing Amendment.
- Navigate to Admin, look under Data collection and modification, and click Data Streams. Click Add stream and select Website for a web property. Enter your primary website URL and a stream name. Leave enhanced measurement enabled to automatically collect page views and standard events.
- Install the tracking code on your website. Under your web stream details, copy your Measurement ID (which starts with “G-”). If you use a supported CMS, paste this ID into the native Google Analytics field provided by your platform. If your CMS does not have a native field, go to the Google tag section under your stream details, click View tag instructions, and select Install manually. Copy the entire JavaScript snippet provided.
- Paste your Google tag immediately after the opening
<head>tag on every page of your website, or use your CMS custom HTML feature.
How to test that it works
Data collection typically takes up to 30 minutes to begin flowing into your new property after you install the tracking code. Once you wait for that initial window, open your website in a new browser tab. Navigate back to your GA4 property and open the Realtime report. If your setup is correct, you will see active users and activity registering on the screen immediately.
Common problems
Even with careful execution, a few common setup issues tend to pop up for advertisers and business owners.
Data is not showing up in real time
If 30 minutes have passed and the Realtime report remains completely empty, your tracking tag is likely missing from the pages or placed incorrectly. Check your website HTML source code to confirm the Google tag is positioned immediately after the opening <head> tag.
Missing the Data Streams option
If you cannot find the Data Streams option inside your property column, you have likely opened an old Universal Analytics property instead of the new GA4 property you just created. Use the top property selector in the Admin area to navigate to your active GA4 property.
Time zone discrepancies in reports
If your daily traffic reports do not align with your local business hours, check your property settings. Ensure your reporting time zone matches your actual location, keeping in mind that changes only apply to future data collection.
Next steps
- 1.Sign in to your Google Account and create your GA4 account and property.
- 2.Generate your web data stream and copy your Measurement ID or Google tag.
- 3.Install the tracking code on your website and verify activity using the Realtime report.
Based on reporting by support.google.com : “https://support.google.com/analytics/answer/9304153”. Read the original for the full story.
This article was written with AI assistance from the source reporting, following Bernardo Viana's editorial guidelines, and checked automatically against the source. Educational content. Ad results vary from business to business. How we work.