Back to All Cheatsheet Libraries cheatsheets

Google Analytics

GA4 event reference, property/tag setup from scratch, and the gotchas that trip up most first-time installs.

Total Events: 0
Category Event Name Key Parameters Fires When
Automaticpage_viewpage_location, page_title, page_referrerCollected automatically by gtag.js/GA4 tag on every page load.
Automaticscrollpercent_scrolledAutomatically at 90% vertical scroll depth (enhanced measurement).
Automaticclicklink_url, outboundAutomatically on outbound link clicks, if enhanced measurement is on.
Automaticfile_downloadfile_extension, file_nameAutomatically when a link to a common document/archive type is clicked.
Ecommerceview_itemitems[], currency, valueA product detail page is viewed.
Ecommerceadd_to_cartitems[], currency, valueAn item is added to the cart.
Ecommercebegin_checkoutitems[], currency, valueThe checkout flow starts.
Ecommercepurchasetransaction_id, value, currency, items[]An order completes — the single most important conversion event to get right.
Engagementsign_upmethodA user completes account registration.
EngagementloginmethodA user authenticates.
Engagementsearchsearch_termA user runs an on-site search.
Engagementgenerate_leadcurrency, valueA form submission or similar lead-gen action completes — the standard B2B conversion event.
Customgtag('event', 'name', {...})any custom key/value pairsWhenever you call it — GA4 accepts arbitrary custom event names and parameters beyond the recommended set.

GA4 Property Setup

The path from a blank Google account to real events flowing into reports.

1

Create the property

In Google Analytics admin, create a new GA4 property under the right account, set the reporting time zone and currency (these can't be changed retroactively on historical data).

2

Add a data stream

Add a Web data stream for the site's domain — this generates the Measurement ID (G-XXXXXXX) every install method needs.

3

Install the tag

Either paste the gtag.js snippet directly into the site's <head>, or — the more maintainable route for anything beyond a single static site — install Google Tag Manager once and manage GA4 (and everything else) as a GTM tag.

gtag('config', 'G-XXXXXXX');
4

Mark conversions

In Admin → Events, toggle "Mark as conversion" on the events that actually matter (purchase, generate_lead, sign_up) — GA4 treats conversions as a first-class concept separate from raw event volume.

5

Verify in DebugView

Use the GA4 DebugView report (with the debug_mode parameter or the Tag Assistant extension) to confirm events are actually arriving before trusting the standard reports, which lag by hours.

Tips & Common Gotchas

Reports aren't real-time
Standard GA4 reports can lag 24–48 hours for full processing. Use the Realtime report or DebugView for same-day verification, not the standard reports.
One tag, not two
Never load gtag.js directly AND route the same Measurement ID through GTM — that double-fires every event and roughly doubles reported traffic.
Consent mode
In regions requiring cookie consent, GA4's Consent Mode lets it model conversions from users who declined tracking rather than losing that data entirely.Set default consent state before the tag fires, not after.
Filter internal traffic
Define an internal traffic rule (by IP) in Admin → Data Streams so your own team's visits don't pollute conversion and engagement metrics.