Sub topic 3
Verifying Data, Access, Privacy, and Structure
This chapter assumes you have a GA4 property, a web data stream, a measurement ID (G-XXXXXXXXXX), and the tag on at least one page. You should be comfortable moving around the Admin page.
Verifying data with Realtime and DebugView
Realtime reports show events from the last 30 minutes. Open Reports > Realtime, load your site in another tab, and confirm that page_view events appear.
DebugView shows each event with its parameters, but only for browsers that send debug data. Add debug_mode to the config call:
<script>
gtag('config', 'G-XXXXXXXXXX', { 'debug_mode': true });
</script>Open Admin > DebugView and check the parameters. Remove debug_mode when testing ends.
Managing user access and roles
Use Admin > Property access management to grant access. Give each person the lowest role that does the job.
| Role | Can do |
|---|---|
| Viewer | Read reports |
| Analyst | Read reports and create analyses |
| Editor | Change property and stream configuration |
| Administrator | Manage user access |
Setting event data retention
Go to Admin > Data settings > Data retention. You can keep event-level and user-level data for 2 months or 14 months. Standard reports use aggregated data and are not affected by this setting.
> Hmm, no.
Consent and privacy considerations
The tag sets cookies and sends visitor data. Where privacy law requires consent, configure a consent banner and Consent Mode before the tag runs. Collect only what you are allowed to collect.
Excluding internal traffic
Staff visits can distort your numbers. Define internal traffic under Admin > Data streams > your stream > Configure tag settings > Define internal traffic, using your office IP address. Then go to Admin > Data settings > Data filters and set the Internal Traffic filter to Active.
Cross-domain measurement basics
A visitor who moves between two domains you own can start a new session unless the domains are linked. Add both domains under Configure tag settings > Configure your domains.
Structuring multiple sites and environments
Use one property per website when the sites have separate teams or budgets. Keep staging data out of production reports by sending it to a separate property or stream, or by filtering it with an internal traffic or developer rule.
Exercise
A visitor moves from shop.example.com to pay.example.com and their session restarts. Which setting should you check, and where?
Show answer
Check Configure your domains under Admin > Data streams > your stream > Configure tag settings, and make sure both domains are listed.