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
- Log into Google Analytics
- Go to Admin → Property Settings
- Copy your Measurement ID (format: G-XXXXXXXXXX)
2. Create API Secret
- In Google Analytics, go to Admin → Data Streams
- Select your web stream
- Navigate to Measurement Protocol API secrets
- Click Create and give it a nickname
- Copy the generated Secret Value
3. Configure in MockCDP
- Navigate to Destinations in MockCDP
- Find Google Analytics 4 in the list
- Toggle Enable to on
- Enter your Measurement ID
- Enter your API Secret
- Click Test Credentials to verify connection
- Click Save Configuration
Event Mapping
MockCDP sends GA4-compatible e-commerce events:
MockCDP Event | GA4 Event | Event Category |
---|---|---|
Page Viewed | page_view | Engagement |
Product Viewed | view_item | E-commerce |
Product Added | add_to_cart | E-commerce |
Checkout Started | begin_checkout | E-commerce |
Order Completed | purchase | E-commerce |
Best Practices
- Real-time Monitoring: Use GA4's Real-time reports to verify events
- Enhanced E-commerce: All events include required e-commerce parameters
- User Identification: MockCDP provides consistent user IDs and client IDs
- Conversion Tracking: Set up goals and conversions to measure simulation effectiveness
- Data Quality: Monitor for data processing delays and accuracy
Need Help?
Check our troubleshooting guide or contact support.