Tracking Events

Event tracking is the backbone for creating audiences with the Marin iOS SDK. Events are used to segment (group) similar devices based on custom triggers.

To track custom events, use the following API after having initialized the SDK.

[Marin trackEvent:@"event1" withMetadata:nil];

🚧

Event Naming

Events can be named anything. But note that there is one internal event created for all apps named devices.all_opens. This name should be avoided for any additional events.

Some customers may have extra data that they would like to be associated with their event. Such metadata can be associated by passing a dictionary to the metadata field like so.

NSDictionary *data = @{
@"game_id": @"123ABC",
@"participants": [
@"user 1",
@"user 2"
]
};
[Marin trackEvent:@"event1" withMetadata:data];

This data will be stored as an object along with other event attributes.