
Google Analytics 4 (GA4) is the modern measurement platform for websites and apps. This guide explains how to set up GA4 from scratch, configure tracking with Google Tag Manager, define events and conversions, test with DebugView, address consent and privacy requirements, and export data to BigQuery for advanced analysis. Actionable templates, naming conventions and platform-specific snippets make this a practical reference for freelancers and small businesses.
What is Google Analytics 4 and why it matters for freelancers
GA4 is an event-based analytics platform that replaces Universal Analytics. It prioritizes user-centric measurement, cross-device reporting, and native integrations with BigQuery. Key benefits for freelancers include:
- Flexible event model to track user interactions without pageview limits.
- Built-in predictive metrics and improved cross-device user stitching.
- Native BigQuery export for custom analysis and reporting.
Authoritative resources: Google Analytics Help provides official setup guidance (Analytics Help), and expert commentary from Simo Ahava explains advanced GTM patterns (Simo Ahava).
Quick GA4 checklist for beginners
A concise checklist accelerates correct setup and avoids common gaps. Follow these steps and validate with DebugView.
Pre-launch checklist (downloadable)
- Create a GA4 property and collect a Measurement ID.
- Decide between direct gtag.js vs Google Tag Manager (GTM).
- Set up a web stream and enable enhanced measurement.
- Create recommended events and conversions using a naming template.
- Implement consent mode and a CMP for GDPR/CCPA.
- Connect GA4 to BigQuery if advanced analysis is planned.
A ready-to-use checklist and event-naming template are available as downloadable assets at the end of the guide.
Step-by-step GA4 installation (web + GTM + platforms)
This section covers installation choices and platform-specific snippets for common CMS/ecommerce environments.
Option A β Direct gtag.js (simple sites)
- Copy the GA4 Measurement ID and paste the gtag.js snippet into the of pages.
- Enable enhanced measurement in the GA4 web stream to capture pageviews, scrolls and outbound clicks.
Recommended reference: Official gtag documentation (gtag.js).
Option B β Google Tag Manager (recommended for flexibility)
- Create a GTM container, add a GA4 Configuration tag with the Measurement ID, and set a Page View trigger.
- Use GA4 Event tags in GTM to send custom events; leverage the dataLayer for structured event payloads.
- Export/import containers to reuse templates across clients.
Expert resource: GTM patterns from MeasureSchool (MeasureSchool).
Platform-specific snippets (copy/paste)
| Platform |
Recommended approach |
Notes |
| WordPress (no plugin) |
Insert gtag.js in header.php or use GTM via theme hooks |
Ensure child theme use to avoid overwrite |
| WordPress (plugins) |
Use GTM plugin or Site Kit by Google |
Site Kit handles permissions and linking |
| Shopify |
Add gtag.js to Online Store > Themes > Edit code |
Use checkout.liquid for checkout tracking |
| WooCommerce |
GTM + dataLayer ecommerce events or plugin |
Ensure product_id and price in dataLayer |
Each snippet includes a dataLayer example and a GTM container export for common ecommerce events in the downloadable package.
Defining events, conversions and naming conventions
Events are the core of GA4. Clear naming and consistent parameters enable reliable reporting and simpler exploration builds.
Event taxonomy and recommended parameters
- Use a three-part naming convention: category_action_label (e.g., form_submit_contact).
- Always include parameters: item_id, item_name, value, currency, method, user_type where applicable.
- Map urgent conversion events (purchase, lead_submitted, signup_complete) as GA4 conversions.
Sample event: {
- event: "newsletter_subscribe",
- parameters: { "method": "modal", "user_type": "new" }
}
Event templates by industry
- Ecommerce: view_item, add_to_cart, begin_checkout, purchase.
- Lead Gen: form_start, form_submit, scheduled_call.
- SaaS: trial_start, activation, subscription_renewal.
A downloadable CSV with 40+ recommended events and GTM tag templates is included to accelerate setup.
Debugging, testing and validation
Testing prevents measurement drift and ensures data quality.
DebugView and common errors
- Use GA4 DebugView with GTM Preview or with gtag debug_mode to validate incoming events in real time.
- Common errors: missing parameters, duplicate events, incorrect currency or improper user_id usage.
- Use browser console to inspect dataLayer pushes and network calls to https://www.google-analytics.com/g/collect.
Reference: GA4 DebugView documentation (DebugView).
Troubleshooting steps
- Confirm Measurement ID in Configuration tag.
- Validate event parameter names and data types against templates.
- Check GTM triggers for correct firing conditions.
- Use network tab to ensure events reach GA4 endpoints.
Privacy, consent and legal considerations
Tracking must comply with regional laws and consent frameworks.
Consent Mode and CMPs
- Implement Google Consent Mode to adjust measurement behavior based on consent status.
- Integrate a CMP that supports IAB TCF v2.2 or local regulatory needs.
- Provide a privacy notice and data retention settings in GA4.
Authoritative links: IAB TCF documentation (IAB TCF) and Google Consent Mode (Consent Mode).
Legal notice
Data controllers must verify lawful bases for processing and set appropriate data retention. Consult legal counsel for jurisdiction-specific compliance.
Dashboards, explorations and BigQuery export
Dashboards turn events into signals. BigQuery unlocks raw event analysis and joins to CRM data.
Quick-start dashboard recipes
- Ecommerce dashboard: revenue, AOV, conversion funnels, top products.
- Lead Gen dashboard: form conversion rate, channel performance, time-to-contact.
- SaaS dashboard: trial conversion curve, churn cohort, LTV projection.
Each recipe includes an Exploration configuration and optional Looker Studio JSON to import.
Exporting to BigQuery
- Link GA4 to a BigQuery project to stream raw events hourly or daily.
- Use SQL to create custom funnels, join with CRM and run user-scoped lifetime analysis.
Google BigQuery export docs: (BigQuery export).
Table: GA4 setup options comparison
| Setup path |
Complexity |
Flexibility |
Best for |
| gtag.js direct |
Low |
Low |
Simple websites |
| Google Tag Manager |
Medium |
High |
Agencies, freelancers, multi-tag sites |
| CMS plugins |
Low |
Medium |
WordPress, Shopify merchants |
| Server-side tagging |
High |
Very High |
Privacy-first architectures, advanced control |
Advanced analysis and sample SQL (BigQuery)
A simple SQL example to compute monthly active users (MAU) from GA4 exported events:
SELECT
FORMAT_TIMESTAMP('%Y-%m', TIMESTAMP_MICROS(event_timestamp)) AS month,
COUNT(DISTINCT user_pseudo_id) AS mau
FROM project.dataset.events_*
WHERE event_name = 'session_start'
GROUP BY month
ORDER BY month DESC;
This query can be adapted to count conversions, cohort retention and revenue per user.
FAQs
What is the difference between Universal Analytics and GA4?
GA4 uses an event-based model, improved cross-device tracking and native BigQuery export. Universal Analytics used sessions and pageviews as primary constructs.
Is Google Tag Manager required for GA4?
No. GTM is not required but recommended for flexibility, version control and easier event management across clients.
How to test GA4 events in real time?
Use GA4 DebugView with GTM preview or enable debug_mode in gtag; validate events and parameters as they arrive.
What events should a freelancer track first?
Start with critical business actions: contact form submit, lead generation, purchase, trial_start and key CTAs.
How to handle GDPR and consent with GA4?
Implement a CMP, enable Consent Mode, and minimize personal data sent to GA4. Consult legal counsel for specific obligations.
Can GA4 export data to BigQuery for free?
BigQuery export requires a Google Cloud project and incurs BigQuery storage/query costs. GA4 links the property to the project; costs depend on usage.
How long until data appears in GA4 reports?
Standard reports update within 24-48 hours; DebugView and Realtime reports update in seconds to minutes.
Where to find event naming templates and GTM containers?
A downloadable ZIP with CSV templates, GTM container exports and Looker Studio JSON dashboards is linked at the end of the resource.
Conclusion
Completing GA4 setup requires clear planning: choose the right installation path, adopt consistent event naming, validate via DebugView, and address consent and export needs. Combining the provided templates, container exports and dashboard recipes reduces implementation time and improves measurement accuracy for freelancers and small businesses.