WegWorks Logo
WegWorksSimplifying Tomorrow
Home Services Blog → Adobe Analytics → Adobe Experience Platform → Adobe Target → AEM → Google Analytics 4 → Segment CDP About Contact

Complete GA4 Migration Guide

With Universal Analytics no longer processing data, organizations must fully transition to Google Analytics 4 (GA4). This comprehensive guide covers everything you need to know about migrating to GA4, from data model differences to implementation strategies and historical data preservation.

Understanding the GA4 Data Model

GA4 represents a fundamental shift in how Google Analytics collects and processes data. Understanding these differences is crucial for a successful migration.

UA vs. GA4: Key Differences

Aspect Universal Analytics GA4
Data Model Sessions & Pageviews Events & Parameters
User Identity Client ID User ID + Device ID
Custom Dimensions 20 (Standard) / 200 (360) 50 Event / 25 User
Goals/Conversions 20 Goals per View 30 Conversions per Property
Views/Data Streams Multiple Views Data Streams

Event-Based Data Model

Everything in GA4 is an event, including pageviews:

Event Categories in GA4

Automatically Collected: page_view, session_start, first_visit, user_engagement
Enhanced Measurement: scroll, outbound_click, site_search, video_engagement, file_download
Recommended: login, sign_up, purchase, add_to_cart (use Google's names)
Custom: Any business-specific events you define

Migration Planning

Step 1: Audit Current UA Implementation

Document everything in your current Universal Analytics setup:

Step 2: Map UA to GA4

Create a mapping document translating UA concepts to GA4:

// UA Event Structure
Category: "Video"
Action: "Play"
Label: "Product Demo Video"

// GA4 Equivalent
Event Name: "video_start"
Parameters:
  - video_title: "Product Demo Video"
  - video_provider: "YouTube"
  - video_url: "https://..."

Step 3: Plan Custom Dimensions

GA4 has different scope options:

Map your UA custom dimensions:

// UA Custom Dimensions
CD1: User Type (User scope) → GA4 User Property
CD2: Page Category (Hit scope) → GA4 Event Parameter
CD3: Author Name (Hit scope) → GA4 Event Parameter
CD4: Login Status (Session scope) → GA4 User Property

Implementation Methods

Method 1: Google Tag Manager (Recommended)

GTM provides the most flexibility for migration:

Create GA4 Configuration Tag

// GA4 Configuration Tag Settings
Tag Type: Google Analytics: GA4 Configuration
Measurement ID: G-XXXXXXXXXX
Fields to Set:
  - send_page_view: true
  - debug_mode: true (during testing)

Create GA4 Event Tags

For each custom event, create a GA4 Event tag:

// GA4 Event Tag Example
Tag Type: Google Analytics: GA4 Event
Configuration Tag: {{GA4 Config}}
Event Name: form_submit
Event Parameters:
  - form_name: {{DLV - Form Name}}
  - form_location: {{DLV - Form Location}}

Method 2: gtag.js Direct Implementation

For sites without GTM:

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX');
</script>

<!-- Track Custom Event -->
<script>
  gtag('event', 'form_submit', {
    'form_name': 'Contact Form',
    'form_location': 'Footer'
  });
</script>

E-commerce Migration

GA4 uses a different e-commerce data layer structure:

Product View (UA vs GA4)

// Universal Analytics Enhanced Ecommerce
dataLayer.push({
  'ecommerce': {
    'detail': {
      'products': [{
        'name': 'Product Name',
        'id': 'SKU123',
        'price': '29.99',
        'brand': 'Brand Name',
        'category': 'Category'
      }]
    }
  }
});

// GA4 E-commerce
dataLayer.push({ ecommerce: null }); // Clear previous
dataLayer.push({
  'event': 'view_item',
  'ecommerce': {
    'items': [{
      'item_id': 'SKU123',
      'item_name': 'Product Name',
      'price': 29.99,
      'item_brand': 'Brand Name',
      'item_category': 'Category'
    }]
  }
});

Purchase Event

dataLayer.push({ ecommerce: null });
dataLayer.push({
  'event': 'purchase',
  'ecommerce': {
    'transaction_id': 'T12345',
    'value': 99.98,
    'currency': 'USD',
    'tax': 5.00,
    'shipping': 10.00,
    'items': [{
      'item_id': 'SKU123',
      'item_name': 'Product Name',
      'price': 29.99,
      'quantity': 2
    }]
  }
});

E-commerce Parameter Changes

GA4 uses different parameter names: id → item_id, name → item_name, category → item_category. Update your data layer accordingly.

Historical Data Preservation

GA4 does not import historical UA data. Preserve your data using these methods:

Option 1: Export to BigQuery

Option 2: Google Analytics API Export

Option 3: Third-Party Tools

Configuration and Settings

Data Streams

Configure separate streams for:

Enhanced Measurement

Enable these automatic tracking features:

Conversions

Mark important events as conversions:

  1. Navigate to Admin → Events
  2. Toggle "Mark as conversion" for key events
  3. Maximum 30 conversions per property

Testing and Validation

Debug Mode

Use GA4 DebugView for real-time validation:

  1. Install GA Debugger Chrome extension
  2. Enable debug mode in GTM or gtag
  3. Navigate to Admin → DebugView
  4. Verify events and parameters in real-time

Validation Checklist

Reporting Differences

New Reports in GA4

Missing Reports

Some UA reports don't exist in GA4:

Conclusion

Migrating to GA4 requires thoughtful planning and execution, but it's also an opportunity to improve your analytics foundation. The event-based model provides more flexibility, and features like BigQuery export unlock powerful analysis capabilities. Take time to properly map your requirements, test thoroughly, and train your team on the new interface.

Need help with your GA4 migration? Contact WegWorks for expert analytics implementation services.