Skip to content

Event Processing

Sam Dozor edited this page Feb 17, 2017 · 2 revisions

Overview

The mParticle SDKs (iOS, Android, Javascript, etc) will send batches of events into the mParticle platform, and ultimately to your lambda-function. The base MessageProcessor implementation is designed to handle these incoming batches of events, and appropriately iterate over each different event, providing you with convenient hooks in which to handle each distinct event type.

In order to process these events, you'll override (in your MessageProcessor subclass) the appropriate method given the event types that you registered for during the module registration process documented here.

Event Object

Each event hook method is given an object that contains the event itself as well as information about the user, device, and application that fired the event.

See here for more on the Event object from which all other events inherit.

Event Methods

The following table shows the correlation between each type and overridable method:

Event Type Method
SESSION_START MessageProcessor#processSessionStartEvent
SESSION_END MessageProcessor#processSessionEndEvent
CUSTOM_EVENT MessageProcessor#processCustomEvent
SCREEN_VIEW MessageProcessor#processScreenViewEvent
ERROR MessageProcessor#processErrorEvent
PRIVACY_SETTING_CHANGE MessageProcessor#processPrivacySettingChangeEvent
USER_ATTRIBUTE_CHANGE MessageProcessor#processUserAttributeChangeEvent
USER_IDENTITY_CHANGE MessageProcessor#processUserIdentityChangeEvent
PUSH_SUBSCRIPTION MessageProcessor#processPushSubscriptionEvent
APPLICATION_STATE_TRANSITION MessageProcessor#processApplicationStateTransitionEvent
PUSH_MESSAGE_RECEIPT MessageProcessor#processPushMessageReceiptEvent
PRODUCT_ACTION MessageProcessor#processProductActionEvent

Next Step

Continue on to Audience Processing