ad:personam GmbH logo
Updated: November 13, 2025Reading time: 9 min read

Google Analytics 4: Complete Setup, GDPR Compliance & Migration Guide

Master GA4 with event-based tracking, GDPR compliance, and Universal Analytics migration. Optimize programmatic campaigns with data-driven insights.

Google Analytics 4: Complete Setup, GDPR Compliance & Migration Guide

Google Analytics 4: Complete Setup, GDPR Compliance & Migration Guide

Google Analytics 4 represents the new standard for digital performance measurement. In this guide, we analyze the key innovations and differences from Universal Analytics, practical procedures for a secure migration, technical opportunities, and compliance implications.

We'll explore GA4's operational advantages, advanced features like BigQuery integration and funnel analysis, privacy documentation requirements and management best practices, and implementation guidance—including for programmatic marketing.

What is Google Analytics 4?

GA4 is the new platform replacing Universal Analytics, introducing event-based tracking logic rather than the traditional session-based model. Every interaction—page views, clicks, completed transactions—is recorded as an event enriched with descriptive parameters.

For example, a "purchase" event can contain details about value, transaction, product, and category. Unlike Universal Analytics, GA4 enables you to follow the same user across multiple devices and platforms, providing unified insights across web and mobile experiences.

Here's a typical scenario: a visitor explores a product on mobile, then completes the purchase on desktop. Through user_id, GA4 delivers effective cross-device analysis, overcoming fragmentation in reconstructing the user journey. Thanks to this architecture, tracking customization and conversion analysis become simpler and more flexible.

What Google Analytics 4 Does and Why It's Valuable for Programmatic Advertising

GA4 finds application across multiple business and operational contexts. Marketing managers can build custom funnels and behavioral analyses, for instance, segmenting users who abandon the checkout process or tracking advertising investment value by integrating BigQuery.

For product managers, GA4 enables analysis of app and web behavior and offers advanced retention and segmentation tools—useful for optimizing features or campaigns. Developers can configure custom events via Tag Manager and use the Measurement Protocol to send server-side data.

For each area, value translates into practical actions: creating custom funnels, exporting data to BigQuery for predictive analytics, configuring custom events, and setting up goal-oriented advanced dashboards.

By analyzing these insights, you can develop increasingly effective programmatic marketing strategies.

In the table below, we summarize the differences between the two systems.

Universal Analytics vs. Google Analytics 4: Key Differences

AspectUniversal AnalyticsGoogle Analytics 4
Data ModelSessions and hitsEvents and parameters
Cross-deviceLimitedNative via user_id
RetentionUp to 26 months2-14 months, extended via BigQuery
ReportingFixed reportsExplorations and dynamic reports
Key MetricsSessions, bounce rateUsers, events, engagement

Data Model

GA4 adopts an event-centric model, more versatile than the session-based approach. It allows collection of multiple parameters for each event. This simplifies tracking customization and building dynamic segments.

Reporting and Metrics

Many UA predefined reports are gone—you need to create them in Explorations. The "bounce rate" metric gives way to the engagement rate. Various goals must be recreated as event conversions.

Tracking Configurations

GA4 automatically enables scroll tracking, internal searches, and downloads. Manual configurations via GTM are still necessary for advanced events.

How to Migrate to Google Analytics 4

Migration requires an audit of active UA events, mapping to events and parameters consistent with GA4, creating a new property, and inserting the measurement snippet (G-XXXXXXX).

Dual tagging—parallel collection between Universal Analytics and GA4—remains recommended during validation. We suggest preparing a migration plan with fields like: original event, GA4 event, additional parameters, implementation priority, test status, and marketing relevance.

Don't overlook permission reviews, privacy policies, and informing internal stakeholders. After cutover, it's essential to compare user and transaction volumes to ensure consistency between the two systems.

Tracking ID vs Measurement ID

Universal Analytics used tracking ID UA-XXXXX. GA4 introduces measurement ID G-XXXXXXX to insert in the tracking snippet. This should be inserted in the page head or in the Tag configuration in Google Tag Manager. Be careful to update every previous implementation to avoid interrupting data collection.

What Identifiers Does GA4 Use?

The client_id identifies the anonymous visitor on browser, while user_id allows reconstructing the journey across multiple devices for authenticated users. On apps, app_instance_id and device IDs for Android/iOS are added to identify installations. User_id should only be used where the user has logged in and with explicit consent, as it can potentially trace back to real identity.

What Data Does GA4 Collect and How to Use It in Programmatic Marketing

GA4 collects events, parameters, user properties, technical data (e.g., browser, device), and demographic estimates. By default, collection is limited to predefined parameters, but can be enriched through custom events and segments. It's important to list all purposes and categories in processing documentation and set up the collection activity log according to GDPR requirements.

Supporting this data in target definition is fundamental for developing increasingly solid programmatic strategies. In fact, integrating campaign data from multiple sources gives you a complete picture of your ad performance and effectiveness.

How Long Can Data Be Retained?

In GA4, you can select user data retention between 2, 14 months and, via BigQuery export, without limits. This configuration happens in the "Data Settings" section. We recommend always adopting a minimization principle: choosing longer periods only if justified by analytical needs, involving the DPO in the choice according to GDPR policies.

Is Google Analytics 4 GDPR Compliant?

GA4 includes tools useful for compliance, such as consent management and retention duration configuration. It's the controller's responsibility to document purposes, legal bases, and any extra-EU transfers by signing Google's DPA and updating the privacy policy. Real compliance depends on how it's installed and what data it collects.

Using clean data compliant with regulations is fundamental for optimizing your programmatic ads.

Is IP Anonymization Necessary? Is Preventive Script Blocking Required?

In GA4, IP anonymization is automatically enabled. For compliance, you need to implement Consent Mode, which limits data collection until explicit consent, and preventively block Analytics tags through a compatible CMP platform. It's good practice to maintain logs and manifests of consent choices for potential audits and proof requests from authorities.

What Settings Don't Migrate to GA4?

Filters, custom views, and UA goals don't migrate: in the new model, you need to use audiences, segments, or events as conversions. After migration, verify that conversions, custom audiences, and strategic views are active and consistent with reporting expectations.

Will I Lose Data Upgrading to GA4?

The transition doesn't automatically import historical data from UA, which remains consultable only in the old interface for a limited period. To ensure continuity, we recommend exporting UA data to CSV and evaluating upload to BigQuery to consolidate the historical base and compare trends during transition phases.

How to Delete User Data

Deletion happens through Data Deletion Requests directly from the GA4 property, indicating user_id or event parameters to remove. The process involves privacy officer and technical owner: once deletion is requested, monitor the queue and verify successful removal.

Attribution Errors in GA4: Causes and Solutions

Attribution errors derive from missing cross-domain configurations, absence of utm parameters on campaigns, incorrect redirects, or wrong attribution models. You can use DebugView and the tracking console to identify anomalies.

Set up cross-domain tracking for all managed domains and choose the attribution model (data-driven, last click...) directly in the Administration area to analyze campaign effects.

Basic Guide: Automatically Detecting Bot Traffic in GA4

GA4 filters bots through automatic blacklist, but detection can be refined by excluding internal IPs and adding custom dimensions (e.g., known user-agent). After configuration, verify results in reports to monitor data cleanliness with a separate segment.

How to Create an Ecommerce Dashboard for GA4

Start by building the dashboard and funnel through Explorations or via Looker Studio, focusing on metrics like revenue, conversion rate, best sellers, average order value, and customer retention. Ensure ecommerce events like add_to_cart, begin_checkout, and purchase are correctly sent.

In ad:personam, you can also create custom dashboards to monitor your programmatic marketing campaigns' performance.

Sign up now and discover more platform features!

Advanced Configuration: Events, Conversions, Measurement Protocol

First, define a clear naming convention (e.g., ecommerce_purchase), document extra parameters, and indicate when to mark the event as conversion. Explore the Measurement Protocol for server-to-server event sending, useful for backend tracking like call center orders or external tools.

BigQuery & Advanced Analytics

Data export to BigQuery enables raw data analysis, practically unlimited retention, and feeding ML models. To have everything at hand, you can create a table with date, event, session and user parameters fields, paying attention to costs related to high volumes and planning data governance and security.

Debug and Verification Tools

DebugView enables real-time event monitoring; Google Tag Assistant and GTM Preview allow testing correct tag activation. After each release, carefully verify that events are captured and conversions are tracked, examining parameters and aggregated data in standard and custom reports.

Frequently Asked Questions (FAQ)

What is Google Analytics 4 for?

Google Analytics 4 serves to analyze user behavior on websites and apps, based on events rather than just sessions. It helps understand which marketing channels drive traffic and conversions, offering a cross-device view of the user journey. Integrated with advertising platforms like ad:personam, GA4-collected data can help improve audience segmentation and optimize programmatic campaigns, for instance, identifying which content or pages generate more interest and therefore deserve investments in qualified traffic.

Is Google Analytics 4 GDPR compliant?

Google Analytics 4 includes features that facilitate GDPR compliance, such as data collection control, consent management through Consent Mode, and the ability to set data retention duration. However, compliance depends on how the site configures GA4 and manages user consent. Those using ad:personam can leverage compliantly obtained data to create aggregate audiences without managing identifiable personal data, maintaining alignment between privacy and campaign performance.

What is a crucial difference between Google Analytics 4 and Universal Analytics properties?

The crucial difference is the data collection model: Universal Analytics is based on sessions, while Google Analytics 4 uses an event-based model. GA4 records every interaction as an event (scroll, click, conversions), enabling more precise analysis and multi-platform tracking. For ad:personam users, this means better connecting programmatic campaign performance to user actions on the site and obtaining useful metrics for optimizing investments and targeting.

Discover the ad:personam Self-Serve DSP to create and launch programmatic campaigns that are always high-performing and GDPR compliant!

Sign up now!

You might also like

Third-Party Cookies: Complete Guide for Digital Marketing
blog

Third-Party Cookies: Complete Guide for Digital Marketing

Learn what third-party cookies are, how they work, GDPR compliance requirements, and cookieless alternatives for digital marketing success.

14 min read
Nov 8, 2025
kpi
digital-marketing-glossary
Click Through Rate (CTR): What It Is, How to Calculate and Improve It
blog

Click Through Rate (CTR): What It Is, How to Calculate and Improve It

Discover what click through rate is, how it's calculated, and why it's crucial for your programmatic marketing campaigns

7 min read
Nov 2, 2025
kpi
digital-marketing-glossary
Viewability: Complete Guide to Measurement, Optimization, and KPIs
blog

Viewability: Complete Guide to Measurement, Optimization, and KPIs

Discover what viewability is, how to measure and optimize it in your digital ads, and which KPIs to track for maximum campaign effectiveness

9 min read
Oct 27, 2025
kpi
digital-marketing-glossary