Enable and Use Analytics on Android
Enable analytics in your mobile app using MarketingCloudConfig.Builder() to set the necessary parameters.
- To implement analytics in your mobile app, set the
analyticsEnabledparameter totrue. - To implement web and mobile analytics in your mobile app via Einstein Recommendations, set the
piAnalyticsEnabledparameter totrue.
Use these methods to integrate your mobile app with Einstein Recommendations. To use these methods, you must have an existing Einstein Recommendations deployment, and you must enable the PiAnalytics option when you configure the SDK.
To track the contents of an in-app shopping cart, use trackCartContents(), as shown in this example.
To track a purchase made through your mobile app, use trackCartConversion(), as shown in this example.
To implement page-view analytics in your app, use trackPageView(), as shown in this example.
Rights of ALBERT EINSTEIN are used with the permission of The Hebrew University of Jerusalem. Represented exclusively by Greenlight.