Google Analytics 4 Integration

Send your simulated events to Google Analytics 4 for web analytics and conversion tracking.

Overview

Google Analytics 4 is Google's web analytics platform for tracking website and app performance. MockCDP integrates with GA4's Measurement Protocol to send realistic e-commerce events for testing and validation.

Required Credentials

  • Measurement ID: Your GA4 property measurement ID (G-XXXXXXXXXX)
  • API Secret: Measurement Protocol API secret

Setup Instructions

1. Get Your Measurement ID

  1. Log into Google Analytics
  2. Go to AdminProperty Settings
  3. Copy your Measurement ID (format: G-XXXXXXXXXX)

2. Create API Secret

  1. In Google Analytics, go to AdminData Streams
  2. Select your web stream
  3. Navigate to Measurement Protocol API secrets
  4. Click Create and give it a nickname
  5. Copy the generated Secret Value

3. Configure in MockCDP

  1. Navigate to Destinations in MockCDP
  2. Find Google Analytics 4 in the list
  3. Toggle Enable to on
  4. Enter your Measurement ID
  5. Enter your API Secret
  6. Click Test Credentials to verify connection
  7. Click Save Configuration

Event Mapping

MockCDP sends GA4-compatible e-commerce events:

MockCDP EventGA4 EventEvent Category
Page Viewedpage_viewEngagement
Product Viewedview_itemE-commerce
Product Addedadd_to_cartE-commerce
Checkout Startedbegin_checkoutE-commerce
Order CompletedpurchaseE-commerce

Best Practices

  1. Real-time Monitoring: Use GA4's Real-time reports to verify events
  2. Enhanced E-commerce: All events include required e-commerce parameters
  3. User Identification: MockCDP provides consistent user IDs and client IDs
  4. Conversion Tracking: Set up goals and conversions to measure simulation effectiveness
  5. Data Quality: Monitor for data processing delays and accuracy

Need Help?

Check our troubleshooting guide or contact support.