Integrate Einstein Recommendations and Collect API
Einstein Recommendations analytics uses a unique identifier to attribute collected analytics to a specific user. By default, the SDK uses the Contact Key as this identifier, also known as the Predictive Intelligence Identifier (PIID). Your app can explicitly set this value.
If the PIID is unset or null, and the SDK is set to use the Legacy PIID, it uses the Contact Key instead.
Important
Set or clear the PIID to control which user receives attribution for collected analytics. Use the analytics manager to manage the identifier.
For SDK version 10, use this example.
1MarketingCloudSdk.requestSdk{ engagementSdk ->2 val analyticsManager = engagementSdk.analyticsManager34 // Set the PI ID5 analyticsManager.piIdentifier = "developer@salesforce.com"67 // Clear the PI ID8 analyticsManager.piIdentifier = null9}
For SDK version 8, use this example.
1SFMCSdk.requestSdk{ sdk ->2 sdk.mp{3 val analyticsManager = it.analyticsManager45 // Set the PI ID6 analyticsManager.piIdentifier = "developer@salesforce.com"78 // Clear the PI ID9 analyticsManager.piIdentifier = null10}11}
For SDK version 7, use this example.
1MarketingCloudSdk.requestSdk{2 val analyticsManager = it.analyticsManager34 // Set the PI ID5 analyticsManager.piIdentifier = "developer@salesforce.com"67 // Clear the PI ID8 analyticsManager.piIdentifier = null9}
Integration Methods
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 your SDK.
Track purchases made through your mobile app to record order details including shipping, discounts, and cart contents. This data helps Einstein Recommendations understand purchase patterns.
Track Page Views
Implement page-view analytics to track which items and pages users view in your app. This information helps Einstein Recommendations provide better product suggestions.
Track Inbox Message Opens
Track inbox message opens to send open analytic values to Marketing Cloud Engagement. The SDK automatically provides analytics for message downloads.
Rights of ALBERT EINSTEIN are used with the permission of The Hebrew University of Jerusalem. Represented exclusively by Greenlight.