Enable analytics in your configuration file using the analytics:true value.

The SDK collects analytics in the background as well as when SDK methods are called.

Track Push Notifications

To ensure proper tracking of push notifications by the SDK and Marketing Cloud analytics, call the SDK in your push notification handler method. If you do not, analytic events can’t track open counts for your push messaging campaigns.

TRACK INBOX MESSAGE OPENS

You can also track analytics for Inbox messages. Call trackInboxOpenEvent() to send the open analytic value to Marketing Cloud. We automatically provide analytic information for message downloads. Call sfmc_trackMessageOpened: with an inbox message dictionary to record the analytic.