GA4 DebugView Testing and Validation
Comprehensive guide to testing and validating GA4 implementation using DebugView.
Overview
DebugView is GA4's real-time debugging tool for validating implementation, testing events, and troubleshooting tracking issues. Events appear in DebugView within seconds, enabling rapid testing before data reaches standard reports.
Accessing DebugView
Path: GA4 Admin -> DebugView
Requirements:
- Debug mode enabled on website/app
- Events sent within last 30 minutes
- Active user session
Enabling Debug Mode
Method 1: Chrome Extension (Recommended)
- Install "Google Analytics Debugger" from Chrome Web Store
- Navigate to your website
- Enable extension (icon turns blue)
- Events automatically appear in DebugView
Benefits: Easy toggle, no code changes, works instantly
Method 2: URL Parameter
Add ?debug_mode=true to any URL:
https://yourwebsite.com?debug_mode=true
https://yourwebsite.com/page?debug_mode=true
Benefits: No extension needed, works for sharing debug links
Method 3: gtag.js Configuration
gtag('config', 'G-XXXXXXXXXX', {
'debug_mode': true
});
Important: Remove for production.
Method 4: GTM Configuration
In GA4 Configuration tag:
- Expand "Configuration Settings"
- Add Fields to Set:
- Field Name: debug_mode
- Value: true
Important: Remove or use variable for production.
Method 5: Mobile App Debug
iOS (Xcode):
- Edit Scheme -> Arguments
- Add:
-FIRDebugEnabled
Android (ADB):
adb shell setprop debug.firebase.analytics.app com.example.app
DebugView Interface
Device Stream (Left Panel)
- Shows active debug sessions
- Displays device type
- Lists user_pseudo_id or user_id
- Shows session timing
- Select device to view events
Event Stream (Centre Panel)
- Real-time event list
- Event names with timestamps
- Event count per type
- Click event for details
- Chronological order
Event Details (Right Panel)
Click any event to see:
- Event name
- Timestamp
- All event parameters
- User properties
- Device information
Reading Event Data
Event Card Information
| Element | Description |
|---|---|
| Event Name | e.g., page_view, purchase |
| Timestamp | When event fired |
| Event Count | Times this event fired |
| Parameters | All sent parameters |
| User Properties | User-level attributes |
Example Event
Event: purchase
Timestamp: 14:23:45
Parameters:
transaction_id: "T_12345"
value: 99.99
currency: "USD"
items: [Array with 2 items]
User Properties:
user_tier: "premium"
Validation Workflows
Workflow 1: New Implementation Test
- Enable debug mode
- Open DebugView
- Load website page
- Verify automatic events:
- session_start
- page_view
- first_visit (if new user)
- Navigate to second page
- Verify page_view fires again
- Check parameters on all events
Workflow 2: Custom Event Test
- Enable debug mode
- Open DebugView
- Trigger custom event (click button, submit form)
- Verify event appears with correct name
- Check all expected parameters present
- Verify parameter values correct
- Confirm data types (number vs string)
Workflow 3: Ecommerce Test
- Enable debug mode
- Complete purchase flow
- Verify each step:
| Step | Event | Check |
|---|---|---|
| Product page | view_item | items array populated |
| Add to cart | add_to_cart | items, value, currency |
| Checkout | begin_checkout | items, value |
| Shipping | add_shipping_info | shipping_tier |
| Payment | add_payment_info | payment_type |
| Confirmation | purchase | transaction_id unique |
- Verify items array structure
- Confirm value matches cart total
Workflow 4: GTM Integration Test
- Enable GTM Preview mode
- Enable GA4 debug mode
- Trigger GTM tag
- Verify in GTM Preview:
- Tag fires
- Variables populated
- Verify in DebugView:
- Event appears
- Parameters match GTM
- Cross-reference both tools
Validation Checklists
Page View Validation
- page_view event appears
- page_location parameter present (full URL)
- page_title parameter present
- page_referrer present (if applicable)
- Fires on every page navigation
Purchase Event Validation
- purchase event fires once
- transaction_id is unique
- value parameter matches total
- currency parameter present (USD, EUR, etc.)
- items array populated
- Each item has item_id or item_name
- Each item has price and quantity
Custom Event Validation
- Event name appears correctly
- Event name follows snake_case
- Event name under 40 characters
- All expected parameters present
- Parameter names under 40 characters
- Parameter values under 100 characters
- Correct data types (string, number)
- No PII in parameters
User Properties Validation
- User properties appear in event details
- Property names correct
- Property values expected format
- Properties persist across events
Troubleshooting
Issue: Events Not Appearing
Causes:
- Debug mode not enabled
- Wrong GA4 property selected
- Events sent more than 30 minutes ago
- Measurement ID incorrect
- Ad blocker blocking
Solutions:
- Verify debug mode enabled (extension active)
- Check correct property in DebugView
- Refresh page and try again
- Verify Measurement ID
- Disable ad blockers for testing
- Try incognito mode
Issue: Missing Parameters
Causes:
- Parameter name misspelled
- Value is undefined/null
- Data layer not populated
- GTM variable not firing
Solutions:
- Check exact parameter name (case-sensitive)
- Validate value before sending
- Check GTM Preview for data layer
- Verify GTM variable configuration
Issue: Wrong Parameter Values
Causes:
- Incorrect data type (string vs number)
- Variable mapping wrong in GTM
- JavaScript returning wrong value
- Encoding issues
Solutions:
- Check data type expectations
- Verify GTM variable mapping
- Console.log values before sending
- Check for special character issues
Issue: Duplicate Events
Causes:
- Multiple tags firing for same event
- Both gtag.js AND GTM installed
- Trigger firing multiple times
- Event pushed to data layer twice
Solutions:
- Check for duplicate GTM tags
- Choose one implementation method
- Add trigger conditions to prevent duplicates
- Debug data layer pushes
Issue: Events in DebugView but Not Reports
Expected: Standard reports have 24-48 hour delay
If persistent:
- Check Realtime reports (faster)
- Verify event count meets threshold
- Check data retention settings
- Confirm no filters blocking data
Testing User Properties
Set User Properties
gtag('set', 'user_properties', {
'user_tier': 'premium',
'account_age_days': 365
});
Verify in DebugView
- Click any event in stream
- Scroll to User Properties section
- Verify properties appear
- Check values correct
- Confirm properties persist across events
Best Practices
Before Launch
- Test all critical events (purchase, sign_up)
- Verify on multiple browsers
- Test on mobile devices
- Check in incognito mode
- Test with new vs returning users
- Verify consent mode behaviour
During Development
- Test each new event immediately
- Use DebugView + GTM Preview together
- Document expected vs actual
- Screenshot issues for team
- Test edge cases
After Launch
- Monitor DebugView first 30 minutes
- Check for unexpected duplicates
- Verify volumes match expectations
- Confirm in standard reports (24-48 hours)
Quick Reference
Enable Debug Mode
| Method | How |
|---|---|
| Chrome extension | Install and enable |
| URL parameter | ?debug_mode=true |
| gtag.js | debug_mode: true |
| GTM | Add debug_mode field |
Access DebugView
Admin -> DebugView
Key Checks
- Event names: max 40 characters, snake_case
- Parameters: max 25 per event
- Parameter names: max 40 characters
- Parameter values: max 100 characters
- No PII in any fields
- Unique transaction_id for purchases
Event Lifecycle
- User action triggers event
- Event sent to GA4
- Appears in DebugView (seconds)
- Appears in Realtime (30 seconds)
- Appears in standard reports (24-48 hours)