Integrate Einstein Recommendations and Collect API
Einstein Recommendations analytics uses an unique identifier to attribute collected analytics to a specific user. By default, the SDK uses the contact key as this identifier, called the PIID. Your app can explicitly set this value.
The Mobile Push SDK has an optional configuration option called useLegacyPiIdentifier. This option replaces an absent or empty PIID with the MobilePush contact key. If this configuration option is false, the SDK doesn’t replace an absent or empty PIID. Review Configure the SDK to configure the SDK with pianalytics and useLegacyPiIdentifier.
Important: To ensure future compatibility, we recommend explicitly setting the PIID. The useLegacyPiIdentifier configuration option will be deprecated in a future release.
Example: Analytic Attribution
These methods integrate your mobile app with Einstein Recommendations. To use the methods, you must have an existing Einstein Recommendations deployment, and you must enable the “pianalytics” option when you configure your SDK.
To track the contents of an in-app shopping cart, use the method shown in the example. For more information about this method’s general use with Einstein Recommendations, review Track Items in Shopping Cart.
To track a purchase made through your mobile app, use the method shown in the example. For more information about this method’s general use with Einstein Recommendations, review Track Purchase Details.
Track Page Views
To implement page-view analytics in your app, use the method shown in the example. For more information about this method’s general use with Einstein Recommendations, review Track Items Viewed.
Rights of ALBERT EINSTEIN are used with permission of The Hebrew University of Jerusalem. Represented exclusively by Greenlight.