Mastering Google Analytics 4 (GA4) is now an essential skill for anyone working in the digital space. Unlike the previous Universal Analytics, GA4 is built on an event‑driven measurement model designed to track every user interaction flexibly across platforms. This guide will take you from initial setup to building custom reports, providing practical examples and best practices to get the most out of your data.
Initial GA4 Setup
Creating a property and data stream
The first step is to create a GA4 property in the Analytics admin console. Go to admin.googleanalytics.com, select your account and click “Create Property”. Choose a meaningful name and set the correct timezone. Once created, you receive a measurement ID (format G‑XXXXXXXX) that identifies your property. Then create a data stream for your website or app: GA4 supports web, iOS and Android streams. For a website, enter the URL and enable Enhanced Measurement to automatically track page views, scrolls, outbound clicks, site search, and video interactions.
Tag installation (gtag.js and Google Tag Manager)
You can install GA4 by adding the gtag.js snippet directly into the <head> of your site or by using Google Tag Manager (GTM), which offers more flexibility. With gtag.js, insert the snippet provided by Analytics. With GTM, create a “Google Analytics: GA4 Configuration” tag associated with your measurement ID and fire it on all pages. The choice depends on project complexity: for simple sites gtag.js is enough, for advanced implementations GTM is recommended. In both cases, verify correct operation using GA4 debug mode or the Google Analytics Debugger Chrome extension.
Fundamental events: structure and implementation
Recommended vs custom events
GA4 organizes events into three categories: automatically collected events (from Enhanced Measurement), recommended events (defined by Google for specific industries), and custom events (created by you). The difference is important: recommended events are recognized by GA4 and automatically populate dedicated dimensions and metrics, while custom events require manual registration of custom dimensions. To maximise integration with standard reports, use recommended events whenever possible. For example, for e‑commerce, send the purchase event with parameters like value and items.
Parameters and custom dimensions
Each event can include up to 25 parameters (key‑value pairs). Parameters can be registered as custom dimensions or metrics. To do so, go to “Admin” → “Custom dimensions” and define the name, scope (event or user) and type (text or number). Example: if you want to track the colour of a purchased product, create a custom dimension product_color. In JavaScript, send the event with:
gtag('event', 'add_to_cart', {
'currency': 'EUR',
'value': 29.99,
'items': [{
'item_id': 'SKU123',
'item_name': 'T-Shirt',
'product_color': 'red'
}]
});Conversions and goals
Defining conversions in GA4
In GA4 conversions are specific events that you mark as “Conversions”. Unlike Universal Analytics, there are no URL‑based goals; any event (recommended or custom) can be declared a conversion. Go to “Admin” → “Conversions” and toggle the switch for the desired event. For custom events, you must send them at least once before they appear in the list. Conversions can include value parameters (e.g., purchase with `value` and `currency`), useful for monetary reporting. For correct attribution, always pass the required parameters for purchase events: transaction_id, value and currency.
Data exploration with Exploration reports
Exploration types: Free Form, Funnel, Path, etc.
Exploration reports are the most powerful tool in GA4 for ad‑hoc analysis. You create them from the “Explore” menu on the left. The main types are:
- Free form: a pivot table with rows, columns and metrics of your choice, similar to a custom report.
- Funnel: analysis of steps in a sequence (e.g., page → login → purchase) with funnel visualisation and segmentation.
- Path: shows user navigation paths starting from a specific event.
- Segment overlap: compares two or more user segments.
- Cohort: analyses behaviour of user groups over time.
Each exploration can be saved, shared and enriched with segments, filters and secondary dimensions. Use the “Event count” metric to count actions or “Total users” for unique users. Combine segments like “Users who completed a purchase” with “New users” for meaningful comparisons.
Custom reports in GA4
Creation and best practices
GA4 no longer offers fully customisable reports like Universal Analytics; flexibility is now provided by explorations. However, you can customise the standard report library by going to “Reports” → “Library” and dragging default reports into new collections or editing existing ones. For more specific needs, use explorations and then export data to Google Sheets or Looker Studio for advanced visualisations. Best practice: first define your business objectives, then select key metrics (KPIs), and only then build the report. Avoid including too many dimensions in a single view; keep the report focused on one analytical question at a time. Leverage segments to isolate user groups (e.g., organic vs paid traffic) and compare time periods using date comparison.
Conclusion and best practices
Mastering Google Analytics 4 means moving away from a pageview mindset and embracing an event‑centric approach. To recap: configure your data stream correctly, use recommended events when possible, declare conversions carefully, explore data through explorations and create reports that answer concrete business questions. For a deeper dive into the Google ecosystem, check the Definitive Guide to Google Services for Developers which covers GA4, Search Console and GTM. Over time, keep your implementation up to date: Google releases new recommended events and analytics features periodically. For official GA4 documentation, see the Google Analytics Developer Guides. With these foundations you are ready to turn data into strategic decisions.
Sponsored Protocol