GA4 is harder to set up correctly than Universal Analytics was. There are more configuration decisions, a different data model, and most properties start with a subtle problem: Enhanced Measurement is turned on by default, collecting page views, scrolls, and some clicks automatically. That completeness is misleading. The auto-collected events are not conversions yet. Custom dimensions aren't registered. Your office traffic isn't filtered. Data will be deleted in two months. The setup isn't done just because GA4 is technically receiving data.
This guide covers the full setup in the right order — from creating the property through linking to Google Ads. Each step builds on the last, and the order matters: you want data retention extended before you accumulate data you're about to lose, and custom dimensions registered before your tags start sending parameters that won't be visible until you do.
Step 1 — Create a GA4 Property
Creating the property
Open analytics.google.com, click Admin (bottom-left gear icon), then Create → Property. You'll be asked for a property name, a reporting time zone, and a currency.
The reporting time zone is the most consequential of the three. GA4 uses it to calculate session boundaries at midnight — if your business is in New York but you set UTC, every session that spans midnight ET will be counted differently than your team expects, and your daily report will never match what your team calls "yesterday." Use your business headquarters time zone, not UTC. This setting is permanent for historical data: if you change it later, data already collected stays associated with the old time zone offsets and comparisons across the change date become unreliable. Set it correctly now.
The data stream page comes next. Select Web, enter your domain, and give the stream a name. Leave Enhanced Measurement on for now — you can dial it back later once you see which events you want to keep.
Naming convention
Use names that someone unfamiliar with your account can understand six months from now. "Analytics 1" tells you nothing. "Brand Website – GA4" tells you the product, the platform, and whether it's the current implementation. If you're running multiple properties — one for the website, one for a mobile app, one for a staging environment — the names need to distinguish them clearly.
Multiple properties don't share data by default. A user who visits your website and uses your mobile app is two separate users in GA4 unless you implement User-ID or link them through Google Signals. That's a separate configuration decision — for now, just create the property you need for the website.
Step 2 — Add the Tracking Code
Via Google Tag Manager (recommended)
For the large majority of websites, GA4 should be deployed through Google Tag Manager rather than as a direct snippet. GTM gives you version control, lets you add and modify tracking without a code deploy, and makes debugging easier.
In GTM: Tags → New → Google Tag. Enter your Measurement ID — it starts with G- and you'll find it in GA4 under Admin → Data Streams → your stream. Set the trigger to All Pages. Name the tag something descriptive like "GA4 – Configuration Tag." Publish the container.
If you already have a Google Tag in your GTM container (from an older setup or Google Ads), check its tag ID first. You may only need to add your GA4 Measurement ID to an existing Google Tag rather than creating a new one — running two Google Tags on the same page can cause double-counting.
Via gtag.js directly
For sites without GTM, the tracking code is pasted directly into the HTML. GA4's data stream page shows the exact snippet — it's two pieces: a <script> tag loading the gtag.js library, and a gtag('config', 'G-XXXXXXXX') call that sends the initial page view. Both go inside <head>, as early as possible — placing it after other scripts means GA4 misses any interactions that happen before it loads.
If you're on a hosted CMS, use the platform's native GA4 integration rather than pasting the snippet manually. Shopify has a Google & YouTube channel that handles GA4; Squarespace has a dedicated Analytics ID field; WordPress with most SEO or analytics plugins has a native GA4 ID input. Using the platform's built-in option avoids the risk of the snippet loading twice or the platform's own tracking overriding yours.
Verify it's working
After adding the tracking code, open GA4 and go to Reports → Realtime. Open your website in another tab. Within 60 to 90 seconds, you should see an active user appear in the Realtime overview. If nothing shows up after two minutes, the tag isn't firing — check for ad blockers, confirm the Measurement ID matches exactly, and verify the GTM container is published (a saved-but-unpublished container doesn't fire).
For a more precise verification, use GA4's DebugView (Admin → DebugView) together with the Google Analytics Debugger Chrome extension. DebugView shows each event individually with its parameters, which makes it easy to confirm the right Measurement ID is receiving data before you go any further.
Step 3 — Configure Basic Settings
Data retention
This is the most commonly skipped setup step, and it has a time-limited consequence: data already collected under the default setting is gone once the retention window closes. Go to Admin → Data collection and modification → Data retention. Change "Event data retention" from 2 months to 14 months. Save.
The 2-month default is chosen for privacy compliance purposes, but most businesses need historical data for longer than that to run year-over-year comparisons, build lookahead audiences, or investigate anomalies. If you're setting up a new property now, do this before any data is collected — but if your property has been running for weeks already, do it immediately regardless. The change only affects data going forward from the moment you make it; you cannot extend retention retroactively.
Internal traffic filter
Without this filter, every person at your company who visits your website is counted as a user. Developer testing, QA runs, marketing team browsing — all of it goes into your reports and distorts conversion rates, session counts, and behavioral data.
The setup has two parts. First: Admin → Data Streams → your stream → Configure tag settings → Define internal traffic. Create a rule with your office IP address (or IP range). This labels matching traffic as internal. Second: Admin → Data Settings → Data Filters. GA4 usually creates a default "Internal Traffic" filter here — check whether it exists. If it does, click it and confirm the filter state is set to Active, not Testing. If it's in Testing mode, it labels data for comparison but excludes nothing from your reports. This is the mistake most setups make — the filter exists, but it isn't actually filtering anything.
Cross-domain tracking
If a user moves between two domains that are part of the same GA4 property — for example, from your main website to a separate checkout domain — GA4 will count them as two separate users unless you configure cross-domain tracking. The session breaks, the referral source resets, and conversion attribution goes wrong.
Configure this in Admin → Data Streams → your stream → Configure tag settings → Configure your domains. Add every domain that should be treated as part of the same user journey. Common candidates: your main domain, your checkout domain (if separate), your help center subdomain. Note that subdomains on the same root domain (like shop.yourdomain.com) typically don't need cross-domain setup — GA4 handles those by default — but a completely separate domain like yourbrand-checkout.com does.
Referral exclusions
When a user leaves your site to complete a payment and returns, GA4 sees the return as a new session from a referral source — the payment processor's domain. This means your purchase confirmation pages show PayPal or Stripe as the traffic source instead of the original channel that brought the user to your site.
Add payment processors to the referral exclusion list in Admin → Data Streams → your stream → Configure tag settings → List unwanted referrals. Common domains to add: paypal.com, stripe.com, checkout.stripe.com. If you use Klarna, Afterpay, or any other third-party payment service that redirects off-site, add those too.
Step 4 — Configure Key Events (Conversions)
Enhanced Measurement gives you page_view, scroll, click, and a few others automatically. None of these are marked as key events by default, and most of them aren't business conversions. A 90% scroll and a purchase are both "events" in GA4's data model — the difference is that you decide which ones represent value by marking them as key events.
Go to Admin → Events. You'll see a list of all events GA4 has collected. For each event that represents meaningful business action — purchase, generate_lead, sign_up, form_submitted, begin_checkout — toggle the "Mark as key event" switch.
Before you mark an event as a key event, confirm it's actually firing. An event that appears in the list with zero occurrences, or that isn't in the list at all, means your implementation hasn't started sending it yet. Marking a non-firing event as a key event creates a conversion that perpetually shows zero and clutters your reporting. Set up the tracking first, verify in Realtime or DebugView that the event fires correctly, then mark it.
Step 5 — Register Custom Dimensions
GA4 can only surface event parameters in its reports if you've registered them as custom dimensions first. Parameters that arrive before registration are collected by GA4 but are invisible in the reporting interface and in Explorations. Registration is retroactive only for the most recent 72 hours of data — parameters that arrived before that window are permanently invisible in the UI, even though they exist in BigQuery if you have export enabled.
Register custom dimensions in Admin → Custom definitions → Custom dimensions before you start sending the parameters in your tags. For each dimension, choose a scope: event-scoped for parameters that vary per event (like content_type or article_category), user-scoped for properties that describe the user persistently (like user_type or subscription_tier).
The free tier allows up to 50 event-scoped and 25 user-scoped custom dimensions per property. Avoid registering dimensions speculatively — register the ones your tags are actually sending. Unused dimension slots can be reclaimed, but only after the dimension has been inactive for 24 hours and is not in use in any saved reports or explorations.
Step 6 — Link to Google Ads and Search Console
Google Ads link
Linking GA4 to Google Ads is required for two things: importing GA4 key events as Google Ads conversions, and using GA4 audiences in your ad campaigns. Without the link, GA4 conversions don't appear in Ads, and your remarketing audiences can't be used for targeting.
Go to Admin → Google Ads Linking and follow the link wizard. You'll need admin access to both accounts. When prompted, enable "Enable personalized advertising" — this is what allows GA4 audiences to be shared with Ads. After linking, allow 24 to 48 hours for key event data to start flowing into Ads before troubleshooting missing conversions.
Search Console link
Linking Search Console surfaces organic query data inside GA4. In the Traffic Acquisition report, you can drill into organic search sessions and see which queries drove them — without leaving GA4. This is particularly useful for connecting conversion data to organic keywords.
Go to Admin → Search Console Linking and connect the verified Search Console property that matches your website. If your site isn't verified in Search Console yet, do that first — Google requires ownership verification before the property appears in the linking wizard. Once linked, organic query data appears in GA4 reports with a delay of one to two days.
Frequently Asked Questions
Is GA4 free?
GA4 is free for the standard version, which is what the large majority of websites use. Google also offers GA4 360, an enterprise tier with higher data limits, more custom dimensions, faster data processing, and guaranteed SLAs — it's a paid product aimed at large organizations. For most websites, including high-traffic ones, the standard free tier is sufficient. The most relevant free-tier constraint is the 14-month maximum data retention for event-level data in the reporting interface; BigQuery export (also free up to certain data volumes) retains data indefinitely if you need longer history.
Do I need Google Tag Manager to use GA4?
No. GA4 can be implemented with a direct gtag.js snippet in your site's HTML without GTM. For simple sites that don't need frequent tracking changes, a direct snippet is a perfectly valid approach. GTM is recommended for most sites because it separates tracking code from your site's codebase — adding events, modifying parameters, and debugging all happen in GTM without requiring a developer deployment. If your site already uses GTM for other tags, adding GA4 through it is the right choice. If you're starting from scratch with no existing tag management, GTM is worth setting up alongside GA4 even if it adds initial complexity.
How long does GA4 take to start collecting data?
The Realtime report shows data within 60 to 90 seconds of a user visiting your site. Standard reports (like Sessions in the Acquisition report) typically show a delay of 24 to 48 hours before data appears — this is normal processing latency, not a sign of a misconfiguration. DebugView shows events in near real time for devices with the GA4 Debugger extension active. If you're still seeing zero data in standard reports after 48 hours, investigate whether the tracking code is firing correctly rather than waiting longer.
What is the Measurement ID in GA4?
The Measurement ID is the unique identifier for your GA4 data stream. It always begins with G- followed by alphanumeric characters (for example, G-XXXXXXXXXX). It's different from your property ID, which is a numeric-only identifier used in API calls. The Measurement ID is what you enter into GTM's Google Tag configuration or into the gtag('config', ...) call. Find it in GA4 under Admin → Data Streams → select your stream — it appears at the top of the stream details panel. If you have multiple data streams (for example, one for web and one for a mobile app), each has its own distinct Measurement ID.
How do I know if GA4 is set up correctly?
A few things to check: open the Realtime report and browse your site — you should appear as an active user within two minutes. Open DebugView with the GA4 Debugger extension active — you should see a page_view event arrive when you load a page. Check Admin → Data Settings → Data Filters and confirm your internal traffic filter is set to Active, not Testing. Check Admin → Data collection and modification → Data retention and confirm it's set to 14 months, not 2 months. Check Admin → Events and confirm your key conversion events are being received and marked as key events. If all four of those are in order, your basic setup is correct — though a thorough audit would also check cross-domain configuration, custom dimension registrations, referral exclusions, and the accuracy of your ecommerce parameters if applicable.
What is data retention in GA4?
Data retention controls how long GA4 stores user-level and event-level data for use in the reporting interface — specifically in Explorations, where you build custom analyses with raw event data. The default is 2 months. At the 2-month default, any Exploration that looks back further than 60 days returns no data for the earlier period. This affects cohort analysis, funnel analysis, and any custom report that needs more than two months of history. Standard reports (like the Traffic Acquisition and Conversions reports in the Reports section) are based on aggregated data that is stored separately and not affected by the data retention setting. Extending retention to 14 months does not change what you see in standard reports — it expands what's available in Explorations.
Can I run GA4 and Universal Analytics at the same time?
Universal Analytics stopped processing new data on July 1, 2023. Standard UA properties are no longer collecting data and the interface was shut down in July 2024. Running both in parallel is no longer possible. If you're setting up GA4 now, you're starting fresh — there's no UA property receiving data alongside it. Historical UA data was exportable before the shutdown deadline; if you didn't export it at the time, that data is no longer accessible through the GA interface.
What is the difference between a property and a data stream in GA4?
A GA4 property is the top-level container that holds all your data, configuration, and reports. A data stream is a source of data feeding into that property — each stream corresponds to a platform: web, iOS app, or Android app. One property can have multiple data streams. A business with a website and two mobile apps would typically have one GA4 property with three data streams. All three streams feed into the same property, so you can analyze cross-platform user behavior in a single report. The Measurement ID (for web) or the firebase_app_id (for apps) identifies the specific stream. Most website-only setups have a single property with a single web data stream.
Audit your GA4 setup
NiceLookingData checks your GA4 property against 61 configuration rules — data retention, internal traffic filters, key event coverage, custom dimension registration, cross-domain setup, and more. See exactly what's misconfigured and how to fix it.
Run a free GA4 audit →Analytics consultant turned founder. After years running the same GA4 and GTM audits across client engagements, Ludde built the audit into a product — so the pattern-matching takes a minute, not a meeting. More about Ludde →
Run a free GA4 audit.
Connect your Google Analytics 4 property. Our auditor runs 61 checks and gives you an instant health score with a plain-English action plan.
