How to Set Up Google Analytics 4 in 2025 (Step-by-Step)

RA
Rasto
Published Apr 15, 2025
How to Set Up Google Analytics 4 in 2025 (Step-by-Step)

Why Google Analytics 4 Matters

Google Analytics 4 is the current standard for website analytics. Whether you are running a personal blog, an e-commerce store, or a business website, GA4 provides essential data about your visitors — who they are, where they come from, what content they engage with, and how they convert. Setting it up correctly from the start ensures you collect clean, actionable data from day one.

Step 1: Create a Google Analytics Account

Visit analytics.google.com and sign in with your Google account. Click "Start measuring" and enter your account name (this can be your business name or personal name). Under account data sharing settings, review and select the options you are comfortable with — the default settings are fine for most users. Click "Next" to proceed to property setup.

Step 2: Set Up Your Property

A property in GA4 represents your website or app. Enter a property name (typically your website name), select your reporting time zone and currency. These settings affect how your data is displayed in reports. Click "Next" and fill in your business details — industry category, business size, and how you intend to use Google Analytics. Click "Create" to generate your property.

Step 3: Set Up a Data Stream

A data stream is the connection between your website and GA4. Select "Web" as your platform type. Enter your website URL and a stream name. Enable "Enhanced Measurement" — this automatically tracks page views, scrolls, outbound clicks, site search, video engagement, and file downloads without any additional code. Click "Create stream."

Step 4: Install the Tracking Code

After creating your data stream, GA4 will provide you with a Measurement ID (starting with "G-") and a Global Site Tag (gtag.js) code snippet. Copy this code and paste it into the head section of every page on your website, immediately after the opening head tag. If you are using a CMS like WordPress, you can use a plugin like "Site Kit by Google" to install the code without editing theme files.

<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>

Step 5: Verify Data Collection

After installing the tracking code, visit your website in a new browser tab. Return to GA4 and click on "Realtime" in the left navigation. You should see yourself as an active user. If data appears, your installation is working correctly. If not, check that the code is placed correctly in the head section and that there are no JavaScript errors on your page.

Step 6: Configure Key Events

GA4 uses an event-based model instead of the old session-based approach. While Enhanced Measurement tracks basic interactions automatically, you should configure key events (formerly called conversions) for your specific business goals. Common key events include newsletter signups, contact form submissions, product purchases, and button clicks. You can mark any event as a key event in the GA4 interface under Admin > Events.

Step 7: Connect Google Search Console

Link your GA4 property to Google Search Console to see organic search data directly in your analytics reports. Go to Admin > Product Links > Search Console Links. This integration shows which search queries bring visitors to your site, your average search position, and click-through rates — invaluable data for SEO optimization.

Next Steps

Once GA4 is collecting data, spend time exploring the standard reports: Acquisition (where visitors come from), Engagement (what they do on your site), and Retention (whether they come back). Set up custom explorations for deeper analysis, and consider creating audiences for remarketing campaigns. Give GA4 at least two weeks to collect enough data before drawing conclusions about your traffic patterns.

RA

Written by Rasto

Technology enthusiast and founder of Randoms Online.