Add Analytics and Predictive Intelligence
You can enable analytics by setting the appropriate parameter in the MarketingCloudConfig.Builder(). Set the analyticsEnabled parameter to true to implement Analytics in your mobile app. Set the piAnalyticsEnabled parameter to true to implement Web and Mobile Analytics in your mobile app.
Personalization Builder and Collect API Integration
The following methods integrate your mobile app with Personalization Builder. You must have an existing Personalization Builder deployment in order to use these. Also, you must enable the “PiAnalytics” option when you configure your SDK.
Use to track the contents of an in-app shopping cart. For more information about this method’s general use with Personalization Builder, see Track Items in Shopping Cart. Sample code for use in your mobile app is below.
Use to track a purchase made through your mobile application. For more information about this method’s general use with Personalization Builder, see Track Purchase Details. Sample code for use in your mobile app is below.
Track Page View
Call the following method to implement page view analytics in your app. For more information about this method’s general use with Personalization Builder, see Track Items Viewed. Sample code for use in your mobile app is below.
Using Contact Key, you can link track cart, track conversion, and other Collect API analytic events with a specific user. Contact Key is included in the Collect API payload and can contain information such as email address, mobile number, customer number, etc. See Updating Contact Key for more information.
Accessing Web & Mobile Analytics
To see your new Web and Mobile Analytics, open the Web and Mobile Analytics app within the Marketing Cloud:
Then check the checkbox agreeing to the Terms and Conditions to get started:
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.