AEMReporter module enables Aggregated Event Measurement (AEM) for iOS apps, allowing measurement of app events from iOS 14.5+ users who have opted out of app tracking.
AEM is iOS only and automatically bypassed on Android. This feature is designed to work with Apple’s App Tracking Transparency (ATT) framework.
Import
What is AEM?
Aggregated Event Measurement allows you to measure app install and app event conversion data from iOS users who have opted out of tracking in iOS 14.5 and later. AEM provides privacy-safe measurement by:- Aggregating conversion data before sending it to Facebook
- Operating without user-level identifiers
- Supporting up to 8 conversion values per campaign
Methods
logAEMEvent
Logs an event for Aggregated Event Measurement. This method automatically handles platform detection and only executes on iOS.string
required
The name of the event to log. Must match event names used in standard app event logging for proper attribution.
number
required
The value associated with the event (e.g., purchase amount, item count).
string
The ISO 4217 currency code (e.g., “USD”, “EUR”, “GBP”). Required for purchase events.
Record<string, string | number>
Additional event parameters as key-value pairs.
Usage Examples
Basic Event
Purchase Event
Event with Additional Parameters
Combined with Standard Event Logging
Platform Handling
The AEM reporter automatically handles platform detection:Deep Link Handling
When users click on Facebook ads, deep link URLs may contain AEM attribution data. Your app needs to process these URLs:Event Name Consistency
AEM event names must exactly match the event names used in your standard app event logging for proper attribution and measurement.
Configuration Requirements
To use AEM effectively:- Configure your ad campaigns in Facebook Events Manager with the events you want to measure
- Set up conversion values for up to 8 events per campaign
- Handle deep links in your app to capture attribution data
- Log events consistently using both standard and AEM logging
Best Practices
- Always log both standard and AEM events to ensure complete measurement across all user types
- Use consistent event names between standard and AEM logging
- Include currency for all purchase-related events
- Test deep link handling before releasing to production
- Monitor your Events Manager to verify AEM data is being received