Skip to main content

What you can sync

  • E-commerce events: Complete purchase funnel tracking with item details
  • Standard events: User engagement, navigation, and content interaction
  • Custom events: Any business-specific events you want to track
  • Audiences: Send audience membership as custom events

Prerequisites

  • A Google Analytics 4 property
  • A Measurement ID (format: G-XXXXXXXXXX)
  • A Measurement Protocol API Secret
You can find your Measurement ID in Google Analytics under Admin → Data Streams → [Your Stream] → Measurement ID. Create an API Secret under Admin → Data Streams → [Your Stream] → Measurement Protocol API secrets.

Event types

Google Analytics 4 supports three types of events that Masivo automatically handles:

E-commerce events (12 events)

These events track the complete purchase journey and preserve the items array structure:

Standard events (20 events)

These events track user engagement and interaction:

Custom events

Any event not matching GA4 standard events will be sent as a custom event with flattened parameters.

Configuration

  1. Go to Settings → Integrations → Google Analytics 4 in the Masivo dashboard
  2. Enter your Measurement ID (format: G-XXXXXXXXXX)
  3. Enter your API Secret
  4. Enable the features you want to sync:
    • Events: All standard GA4 events
    • Purchases: Only fulfilled purchases
    • Audiences: Calculate and Delete operations
Make sure your Measurement ID starts with “G-” (for GA4). Universal Analytics properties (starting with “UA-”) are not supported.

How it works

Once configured, Masivo automatically transforms and sends your data to Google Analytics 4:
  1. Real-time sync: Events are sent as they occur in Masivo
  2. Smart transformation: Events are automatically transformed to match GA4’s expected format
  3. Event type detection: Masivo detects if an event is e-commerce, standard, or custom
  4. Data validation: Configuration and data are validated before sending
  5. Error handling: Failed syncs are logged for debugging

Automatic transformations

Masivo automatically handles several transformations to ensure compatibility:
  • Event names: Converted to lowercase (e.g., PURCHASEpurchase)
  • Field mapping: Common alternative field names are mapped automatically
  • Items preservation: E-commerce events preserve the full items array structure
  • Parameter flattening: Custom events flatten nested objects into flat key-value pairs
  • Timestamp conversion: Converts timestamps to GA4’s microsecond format

Data structure

Event format

Send events to Masivo using this structure:

Items array structure

For e-commerce events, each item in the items array supports these native GA4 fields:
At minimum, each item must have either item_id or item_name. All other fields are optional but recommended for better reporting.

Field mapping

Masivo automatically maps common alternative field names to GA4 standards:
Most GA4 standard fields (like currency, value, tax, shipping, method, screen_name, etc.) do NOT need transformation. Only the fields listed above are automatically mapped from alternative names.

Examples

Add to cart event

Search event

Audience synchronization

Audience calculation operations

When audiences are calculated in Masivo, they’re sent to Google Analytics 4 as custom events:
  • Event name: audience_updated
  • Includes: audience_id, audience_name, customers_count, action
  • Customer IDs are included for reference

Audience DELETE operations

When audiences are deleted:
  • Event name: audience_removed
  • Automatically includes all customers in the audience
  • Ensures proper cleanup in your GA4 reports
Audience events use a special client_id of “audience_manager” and include all relevant customer information for proper tracking.

Validation

Before sending data to Google Analytics 4, Masivo validates:
  • API credentials: Measurement ID and API Secret are configured
  • Event configuration: The event type is enabled in your settings
  • Data completeness: Required fields are present for each event type
  • Purchase status: Only fulfilled purchases are sent (if configured)

Best practices

  1. Always include customer_id: Required for user identification (automatically mapped to GA4’s client_id)
  2. Use consistent item IDs: Ensures accurate product analytics
  3. Include all item fields: Richer data enables better reporting
  4. Add currency codes: Required for accurate revenue tracking
  5. Send timestamps: Use issued_at for accurate event timing
  6. Include promotional data: Track campaign effectiveness with promotion_id, promotion_name, etc.
  7. Use item_list_name: Helps track where users interact with products

Limitations

  • Items array: Only preserved for e-commerce events; custom events flatten arrays
  • Nested objects: Custom events flatten nested objects into prefix_key format
  • Data types: Only primitives (string, number, boolean) are supported in custom events
  • Rate limits: Subject to Google Analytics 4 rate limits (typically not an issue)
Custom events (non-GA4 standard) will have their parameters flattened. For example, nested objects become event_object_field format.

Troubleshooting

Events not appearing in GA4

  • Check that your Measurement ID starts with “G-” (not “UA-”)
  • Verify your API Secret is correct
  • Ensure the event type is enabled in Masivo settings
  • Check that customer_id is included in your events

Purchase events missing

  • Verify that “Purchases” is enabled in settings
  • Confirm purchases are marked as fulfilled
  • Check that transaction_id is unique for each purchase
  • Ensure items array contains at least one item with item_id or item_name

Items not showing in reports

  • Verify each item has item_id or item_name
  • Check that currency and price are included
  • Ensure numeric fields (price, quantity) are sent as numbers, not strings
GA4 can take up to 24-48 hours to process and display new events in reports. Use the DebugView feature in GA4 to see events in real-time during testing.

Debug mode

To test your integration before going live:
  1. Enable debug mode in your GA4 property
  2. Send test events through Masivo
  3. View real-time events in GA4’s DebugView
  4. Verify event structure and parameters
Use GA4’s DebugView (Admin → DebugView) to see events in real-time and verify the data structure before sending production traffic.