In this article
- What a GA4 setup involves
- Step 1: create the property and data stream
- Step 2: install the tag through Google Tag Manager
- Step 3: set up consent mode
- Step 4: decide which actions are key events
- Step 5: add ecommerce events for online stores
- Step 6: filter internal and unwanted traffic
- Step 7: adjust the defaults
- Step 8: link Search Console and Google Ads
- Step 9: test everything
- Step 10: write it down
- Common GA4 setup mistakes
- Reading your first reports
Installing Google Analytics 4 takes five minutes. Setting it up so the numbers are right and actually useful takes a bit longer. This guide walks through the steps in the order I follow when I do GA4 setup and analytics for clients, including the parts that most setups skip: consent mode, key events, internal traffic and testing.
What a GA4 setup involves
A GA4 setup has three layers. The property in Google Analytics, where data is stored and reported. The tag on your site, which sends the data, ideally through Google Tag Manager. And the configuration: which actions count as key events, what is filtered out and which Google tools are linked. Most broken setups get the first two right and skip the third.
Step 1: create the property and data stream
- In Google Analytics, go to Admin and create a property. Set the reporting time zone and currency to match your business.
- Add a web data stream with your site's URL. GA4 gives you a measurement ID that starts with
G-. - Leave enhanced measurement on. It tracks page views, scrolls, outbound clicks, site search, video engagement and file downloads without extra work.
- Make sure the account belongs to the business, and that you are an administrator. Give agencies and freelancers their own access instead of sharing logins.
Step 2: install the tag through Google Tag Manager
You can paste the Google tag directly into your site, but Google Tag Manager makes everything after this easier. Create a GTM container, add its code to your site, then create a Google tag in GTM with your G- measurement ID, firing on all pages. On WordPress this goes in the theme or through a lightweight plugin. On Shopify, the theme gets the normal code and checkout events are handled through the customer events settings.
Check that GA4 isn't also installed by a theme setting or a plugin. Two tags mean every visit counts twice.
Step 3: set up consent mode
If you have visitors in the EU or UK, analytics cookies should only be set after the visitor agrees. Consent mode connects your cookie banner to Google's tags. When a visitor declines, Google's tags run without cookies; when they accept, tags run normally. Version 2 adds signals for advertising data (ad_user_data and ad_personalization), which matter if you run Google Ads.
Set the default state to denied before any tag loads, update it when the visitor makes a choice, and test both paths. A cookie banner that only looks like it works is a common finding in audits.
Step 4: decide which actions are key events
GA4 tracks many events, but only a few matter to the business. Mark those as key events (GA4's current name for conversions). Typical ones:
generate_lead: a contact or quote form sent.- A click on your phone number or WhatsApp link.
- A booking made.
purchase: an order completed.
Fire form events on a real success signal, such as the thank-you message or page, not on the button click, so failed submissions aren't counted. Keep the list short. If everything is a key event, nothing is.
Step 5: add ecommerce events for online stores
For a store, set up the standard ecommerce events with item data and value: view_item, add_to_cart, begin_checkout, add_payment_info and purchase. With these, GA4's ecommerce reports show which products sell and where people drop off. Shopify's native integration covers most of this; on WooCommerce, a well-maintained plugin or a custom dataLayer does the job. Make sure purchase fires once per order, with a transaction ID, so a page reload doesn't create a second sale.
Step 6: filter internal and unwanted traffic
- Define your office or home IP addresses as internal traffic, then activate the filter once you've tested it.
- List payment providers and booking tools under unwanted referrals, so a customer returning from the payment page isn't counted as a new visit from that site.
- If your checkout or booking runs on another domain, set up cross-domain measurement.
Step 7: adjust the defaults
- Set data retention to the longest option, so exploration reports can look back further.
- Check the reporting identity and Google signals settings against your privacy policy.
- Create a small number of custom dimensions only if you need them, for example a form name.
Step 8: link Search Console and Google Ads
Linking Search Console brings organic search queries and landing pages into GA4. Linking Google Ads lets you import key events as conversions and see what happens after an ad click. Both take a minute in the Admin section and are worth doing on day one.
Step 9: test everything
Open GTM's preview mode and GA4's DebugView, then use your site like a customer: browse, send a form, click the phone number, place a test order. Confirm each event appears once, with the right parameters. Check the real-time report from your phone too. Only then publish the GTM container.
Step 10: write it down
Keep a short document listing every event, what triggers it and why it exists. It takes ten minutes, and it saves hours the next time someone touches the setup.
Common GA4 setup mistakes
- GA4 installed twice, doubling page views.
- Form events firing on click instead of on success.
- Purchase events firing again on page reload.
- No consent mode, or a banner that doesn't actually block anything.
- Payment providers showing up as top referral sources.
- Nobody on the business side having admin access.
Reading your first reports
Give the setup a week or two to collect data. Then start with three reports: Traffic acquisition to see where visitors come from, Pages and screens to see what they read, and the key events view to see which channels lead to enquiries or sales. Resist building dashboards on day one. Knowing those three well is worth more.