Find a course

Module 3: Google Analytics 4 in PracticeLesson 7 of 1212 min

Setting Up GA4 the Right Way

Create a GA4 property and web data stream, install the tag, exclude internal traffic, adjust data retention and verify that tracking works.

Step 1 of 12Learn

Setup mistakes are expensive later

A small online store installed GA4 in ten minutes, saw numbers appear and moved on. A year later, it wanted to compare holiday seasons and analyze checkout behavior. It discovered three problems: the staff's own visits, dozens a day, were mixed into the data; detailed exploration data older than two months had been deleted because of a default setting; and purchases had never been tracked as events, so there was no revenue data at all.

None of these problems can be fixed retroactively. Analytics only records what it was set up to record, from the moment it was set up. Half an hour of careful configuration on day one saves months of missing data.

GA4 is organized in three levels:

  • Account: usually one per organization. It holds one or more properties.
  • Property: the container for one website or app business, with its own reports, settings, time zone and currency. A single property can combine a website and its apps.
  • Data stream: a source of data flowing into the property: a web stream for a website, or an iOS or Android stream for apps. Each web stream has a measurement ID beginning with "G-" (for example G-AB12CD34EF), which the tag uses to send data to the right place.

Step 2 of 12Practice · Put in order

Arrange the GA4 structure from the broadest level to the most specific.

Drag the items, or use the arrow buttons, to put them in order.

  1. Events (individual actions sent by the stream)
  2. Data stream (a website or app sending data)
  3. Account (the organization)
  4. Property (one website or app business, with its own reports)

Step 3 of 12Practice · Diagram

How a GA4 setup is structured

Where do the reports for the website and both apps come together?

Tap the shape that answers the question, then press Check.

How a GA4 setup is structuredHierarchy diagram: Account: Acme Ltd, Property: Acme Shop, Web data stream, iOS app stream, Android app stream, Events: page_view, purchase…, Events: screen_view….Account: Acme LtdProperty: AcmeShopWeb data streamiOS app streamAndroid app streamEvents: page_view,purchase…Events: screen_view…
Account: Acme Ltd

The organization. It can hold several properties.

Property: Acme Shop

One business presence with its own reports and settings.

Web data stream

acme-shop.com

iOS app stream
Android app stream
Events: page_view, purchase…
Events: screen_view…

Step 4 of 12Learn

Installing the tag and configuring basics

There are three common ways to install the GA4 tag:

  1. Paste the Google tag (a short script containing your measurement ID) into the head section of every page, usually via your site template.
  2. Use Google Tag Manager: install the GTM container once, then add a GA4 configuration tag with your measurement ID inside GTM. This is the most flexible option for adding events later.
  3. Use a built-in integration: many website builders and ecommerce platforms have a field where you paste the measurement ID.

Use only one method. Installing the tag twice (for example, both hard-coded and through GTM) causes duplicate page views, which shows up as suspiciously high views per session and very low bounce rates.

Then configure the property's basics:

  • Time zone and currency: set them to match your business, so daily reports and revenue line up with your other systems.
  • Data retention: GA4 keeps event-level data used in explorations for 2 months by default. In standard properties you can raise it to 14 months. Standard aggregated reports aren't affected, but you'll want the longer setting for year-over-year explorations, so change it on day one.
  • Enhanced measurement: review which automatic events are on.
  • Key events: mark the actions that matter as soon as they're tracked.

Step 5 of 12Compare

Three ways to install the GA4 tag

AspectPaste the Google tagGoogle Tag ManagerBuilt-in integration
HowScript with your measurement ID in every page headGTM container once, GA4 tag configured inside GTMPaste the measurement ID into a platform field
Adding events laterNeeds code changesEasiest: done in a web interfaceLimited to what the platform offers
Best forSimple sites you controlSites that will grow their trackingWebsite builders and shop platforms
Watch outUse only one method: two installs double page viewsUse only one methodUse only one method

Step 6 of 12Practice · Choose one

A site's GA4 reports suddenly show twice as many page views as before, with views per session doubling overnight and bounce rate near zero. What is the most likely cause?

Step 7 of 12Practice · True or false

Changing GA4 data retention from 2 months to 14 months recovers detailed exploration data from the previous year.

Step 8 of 12Learn

Keeping your data clean

Two more settings protect data quality.

Filter internal traffic. Your team visits the site constantly: checking pages, testing checkout, reviewing new content. On a small site, that can be a big share of traffic and can distort conversion rates. GA4 lets you define internal traffic by IP address in the data stream settings and then activate a data filter that excludes it. Filters in GA4 aren't retroactive and apply only to data collected after activation. Create the filter in testing mode first, check that it identifies the right traffic, then activate it.

Exclude unwanted referrals. Some visitors leave your site briefly, for example to a payment provider, then return to a "thank you" page. Without configuration, the return can be credited to the payment provider as a referral, stealing credit from the real source. Add such domains to the list of unwanted referrals in the tag settings.

Watch for spam and bots. GA4 automatically excludes traffic from known bots and spiders. If you still see strange spikes, for example thousands of one-second sessions from one city with no engagement, investigate and segment them out of your analysis.

Verify with DebugView and Realtime. The Realtime report shows activity in the last 30 minutes, so you can visit your site and watch yourself appear. DebugView shows every event and its parameters from a device in debug mode, which is the best way to confirm that a new event fires correctly before relying on it.

Step 9 of 12Tap to reveal

A day-one GA4 setup checklist

  1. Create the property

    Set the correct reporting time zone and currency, then create a web data stream and copy its measurement ID.

  2. Install the tag once

    Use one method only: hard-coded tag, Google Tag Manager or a platform integration.

  3. Set data retention to 14 months

    Do it immediately; the setting is not retroactive.

  4. Define and filter internal traffic

    Add your office and team IP addresses, test the filter, then activate it.

  5. Mark key events

    Implement recommended events like purchase or generate_lead and mark them as key events.

  6. Verify

    Use Realtime and DebugView to confirm page views and key events arrive with the right parameters.

Step 10 of 12Practice · Match the pairs

Match each GA4 feature to its purpose.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. Realtime report
  2. DebugView
  3. Internal traffic filter
  4. Unwanted referrals list

Step 11 of 12Note

Step 12 of 12Practice · What would you do?

What would you do?

A five-person company sees that its website conversion rate is 9%, far above what it expected. The team visits the site many times a day, including submitting the contact form to test it. No filters are set up. What should it do first?