Overview
Introduction
Criteo serves personalized ads to mobile app users that have a high probability of clicking through and either installing your app or making an in-app purchase. Criteo technology is based on real-time product recommendation optimization and prediction engines.
In order to enable its technology, Criteo needs:
- App Events - App events and relevant data correctly captured on your mobile app
- Catalog Feed - A CSV or XML file (called a Catalog Feed) containing product information of a large portion of your mobile app’s offers
- (For Retargeting) Deeplink and Universal Link capability - Product level deep link capabilities in app to take users to the products they clicked on
About this Guide
This document provides detailed information on the following integration stages:
- App events and parameters
- Kochava dashboard configuration, including postbacks
- Generation of tracking links
- Catalog feed integration (for product-level ads)
- Deeplinking & Universal Linking (for Retargeting)
- Testing process
Integration Steps
The table below describes the steps to follow during this integration.
Steps to Follow | Where to Integrate |
---|---|
Integration Questionnaire | Client |
Integration Kickoff Call | Criteo & client technical teams |
Dashboard Configuration | Client-side or (recommended) on call |
(for product-level ads) Catalog Feed Integration | Criteo & client technical teams |
(only if needed) Criteo Event Integration | Client-side |
(only if needed) Testing events | Criteo & client technical teams |
(only if needed) App Submission & Release | Client-side |
Pre-Launch Checks | Criteo |
Campaign Launch | Criteo (with client’s authorization) |
App Events & Data
If you already have Kochava events configured, please skip this section.
To integrate the Kochava SDK and events from scratch, or add additional ones, please expand this section.
Use the following code snippet at the app launch: Below are examples of the different event types Criteo recommends that you integrate using the Kochava SDK: The Use the following code snippet to implement: The Use the following code snippet to implement: The Use the following code snippet to implement: The Use the following code snippet to implement: The Use the following code snippet to implement: The Use the following code snippet to implement: The Use the following code snippet to implement: The Use the following code snippet to implement:Expand
SDK Initialization
HashMap<String, Object> datamap = new HashMap<String, Object>();
datamap.put(Feature.INPUTITEMS.KOCHAVA_APP_ID, “YOUR_APP_ID_FROM_KOCHAVA_DASHBOARD”);
datamap.put(Feature.INPUTITEMS.CURRENCY, Feature.CURRENCIES.USD);
Feature kTracker = new Feature(getApplicationContext(), datamap);
HashMap<String, String> kData = new HashMap<String, String>();
kData.put( "language" , "en" );
kTracker.linkIdentity(kData);
Events Implementation in the App
Kochava event
Description
SessionBegin
App open / app brought to the foreground.
View Listing
View of a list of products.
View Product
View of a specific product details page.
View Basket
View of the shopping basket, or an addition made to it.
Purchase
Purchase of one or more products.
Level Achieved
User Level (for Gaming apps)
Status
User’s Subscription Status (i.e. subscriber, free, premium)
Achievement Unlocked
Major milestone reached within a game (for Gaming apps)
SessionBegin
sessionBegin
event should be sent to Kochava with each new session, after Kochava SDK initialization. SessionBegin is a standard event supported by the Kochava SDK.kTracker.event("SessionBegin", "");
View Listing
viewListing
event should be triggered on pages displaying product lists like a category page or a search results page. You should include in the array the IDs of the top 3 products (it’s fine to include more). These IDs must match to those passed in the catalog feed. Note that viewListing is not supported out of the box using Kochava’s SDK and must be implemented as a custom event.JSONObject viewListing = new JSONObject();
JSONArray products = new JSONArray();
products.put("productId1");
products.put("productId2");
products.put("productId3");
// number of proudcts in serarch results, category page, etc...
viewListing.put("product", products);
kTracker.event("viewListing", viewListing.toString());
View Product
View
event should be triggered on all product details pages. You should include the ID of the product detailed on the page by the Event Item name, and send the Event Item with the event. It must be the same ID as used in the catalog feed, and must be unique. View is a standard event supported by the Kochava SDK.JSONObject obj = new JSONObject();
obj.put("product", "productId1");
// obj.put("product", "productId2");
//
// ...can support multiple products
kTracker.event("View", obj.toString());
View Basket
viewBasket
event should be triggered on the basket-details pages. You must include the IDs, prices, and quantities of the basket’s products by the Event Items array. Note that viewBasket is not supported out of the box using Kochava’s SDK and must be implemented as a custom event.JSONArray products = new JSONArray();
JSONObject product1 = new JSONObject();
JSONObject product2 = new JSONObject();
// etc... number of product in basket
JSONObject viewBasket = new JSONObject();
product1.put("id", 1);
product1.put("price", 2.95);
product1.put("quantity", 5);
product2.put("id", 2);
product2.put("price", 19.95);
product2.put("quantity", 1);
products.put(product1);
products.put(product2);
viewBasket.put("currency", "USD");
viewBasket.put("product", products);
MainActivity.kTracker.event("viewBasket", viewBasket.toString());
Purchase
Purchase
event should be triggered on order confirmation pages. You should include a unique transaction ID and place the IDs, prices, and quantities of the products bought in the transaction into the Event Items array. Purchase is a standard event supported by the Kochava SDK.JSONArray products = new JSONArray();
JSONObject product1 = new JSONObject();
JSONObject product2 = new JSONObject();
// etc... number of products purchased
JSONObject trackTransaction = new JSONObject();
product1.put("id", 1);
product1.put("price", 2.95);
product1.put("quantity", 5);
product2.put("id", 2);
product2.put("price", 19.95);
product2.put("quantity", 1);
products.put(product1);
products.put(product2);
trackTransaction.put("nc", 1); // to indicate a new customer 1, else 0
trackTransaction.put("id", "<<INSERT TRANSACTION ID>>");
trackTransaction.put("currency", "USD"); // currency of transaction
trackTransaction.put("product", products);
kTracker.event("Purchase", trackTransaction.toString());
Level Achieved
userLevel
event allows Kochava to identify the highest level achieved by a user. This event is specific to Gaming vertical. It should be triggered every time the user levels up. userLevel is a standard event supported by the Kochava SDK.JSONObject uiLevel = new JSONObject();
uiLevel.put("ui_level", 5);
kTracker.event("userLevel", uiLevel.toString());
Status
userStatus
event allows Kochava to identify a user’s subscription status (i.e. free, subscriber, premium). This event should be triggered to initialize user’s status and every time when his status changes. Note that userStatus is not supported out of the box using Kochava’s SDK and must be implemented as a custom event.JSONObject uiStatus = new JSONObject();
uiStatus.put("ui_status", "subscriber");
kTracker.event("userStatus", uiStatus.toString());
Achievement Unlocked
achievementUnlocked
event allows Kochava to identify wheter a user has reached a specific milestone within the game. achievementUnlocked is a standard event supported by the Kochava SDK.JSONObject uiAchievement = new JSONObject();
uiAchievement.put("ui_status", "subscriber");
kTracker.event("achievementUnlocked", uiStatus.toString());
Hashed Email for Cross-Device Targeting (Recommended)
Clients have the option of sending Criteo the email address of app users when available. This will enable the cross-device Criteo targeting feature.
Expand
To generate an MD5 hash of an email address:
- Convert all characters to lower case
- Remove any blank spaces
- Convert to UTF-8
- Hash using MD5 algorithm
The email can be sent to Criteo by associating with the identity link during SDK initialization.
Use the following code snippet below as an example on sending MD5 hashed email.
kTracker = new Feature(getApplicationContext(), datamap);
HashMap<String, String> kData = new HashMap<String, String>();
kData.put( "language" , "en" );
kData.put( "email_md5" , "6589e68c2a242271e56710100222ff83" );
kTracker.linkIdentity(kData);
Kochava’s SDK also allows client apps an option to send email in clear text. Kochava servers generate MD5 hash of this email address before forwarding it to Criteo.
Use the following code snippet as an example of how to send raw email addresses:
kTracker = new Feature(getApplicationContext(), datamap);
HashMap<String, String> kData = new HashMap<String, String>();
kData.put( "language" , "en" );
kData.put( "email_raw" , "kochava_android@criteo.com" );
kTracker.linkIdentity(kData);
Kochava Dashboard Configuration
Adding the ‘Criteo New’ Publisher Network
To add ‘Criteo New’ as a partner on Kochava’s dashboard:
- Login to Kochava Dashboard.
- Select the App
- Under the left menu bar, click the Partner Configuration tab, and then click Add Configuration button.
Finally, input 'Criteo New' into the Media Partner text field and select the 'Criteo New' publisher network option when it appears below the text field. To save Criteo as a partner, click on the Go button.
Configuring Criteo Postbacks
Once the partner is configured, postbacks can be setup for each event type.
Open the ‘Criteo New’ module’s menu and click Postbacks
Install is automatically listed and its status is Configured postback, however it still needs additional setup (please see step 4 below for details). SessionBegin and the other post install events will be listed once received by Kochava. All the events (except install) are initially in status Active Event, meaning the postback is available but is not sending to Criteo yet. Once a postback is configured its Status becomes Configured postback.
On the menu on the next to the event select Create.
The postbacks need to configured for: Install, SessionBegin, and all other relevant events available for the campaign such as post-install KPI events.
For Retargeting, it’s highly recommended to also postback the key stages of the purchase funnel (for a retail app this would be events similar to SessionBegin, Search/Category Results, Item Details, Basket Add/View, Purchase Confirmation).All the following settings are required for postbacks to function well:
CRITEO BUNDLE ID: Unique bundle ID of the app (this uniquely identifies the app to Criteo)
SEND ALL EVENT DATA: Check the box to send all data to Criteo. Essential for harnessing Criteo’s machine learning at its full potential (both user bidding and product recommendation), and useful for other use casees such as audience segmentation and custom reporting.
DELIVERY DELAY: Select Realtime Delivery
DELIVERY METHOD: Select All to send attributed, unattributed and organic events to Criteo. Essential for the same machine learning purposes mentioned above, and also to better suppress installed users from your App Install campaigns.
Then, click Save.
Attribution Settings - Partner Level
- Select Apps & Assets
- Select Partner Configuration
- To the right of ‘Criteo New - Android’, select the three-dots menu
- Select Reconciliation
Configure the windows below according to your attribution model, or these suggested defaults:
Tracking Links
Install Tracking
Click to Expand
Go to Campaign Manager
- Log in to Kochava.
- Select the desired Account and App.
- Select Links > Campaign Manager.
Add tracking to the campaign
- Click Add a Tracker or Select Segment > Add a Tracker.
Set the tracking
Required:- Select Campaign
- Select Segment
- Set Tracker Name
- Select Tracker type Acquisition
- Select Criteo Criteo New - Android
- Important: all new integrations (and re-launches) must use the ‘Criteo New’ integration
- Check the box for Share with publisher
- Set destination URL: Custom / Landing page / Google Referrer
Optional: Agency
* utm parameters
* Custom parameters
* PricingCopy Click URL and Impression URL
Retargeting Tracking
Click to Expand
Go to Campaign Manager
- Log in to Kochava.
- Select the desired Account and App.
- Select Links > Campaign Manager.
Add tracking to the campaign
- Click Add a Tracker or Select Segment > Add a Tracker.
Set the tracking
Required:- Select Campaign
- Select Segment
- Set Tracker name
- Select Tracker type : Reengagement
- Select Criteo New - Android.
- Important: all new integrations (and re-launches) must use the ‘Criteo New’ integration
- Check the box for Share with publisher
- Set destination URL: Custom / Landing page / Google Referrer
- Select Event(s) for Reengagement: ‘All’ (if All is not selected and an event is not in the list, Criteo will not be able to effectively optimize toward the KPI event/s).
Optional: Agency
* utm parameters
* Custom parameters
* PricingSet a custom lookback window
- Tracker-level lookback windows can be set within Power Editor –> Tracker Overrides, however this is a paid feature of Kochava.
Copy Click URL and Impression URL and send to your Criteo contact
Catalog Feed
A catalog feed is an XML or a CSV file containing product information (name, price, deep link, image link…) that allows Criteo to dynamically generate product-level banners tailored to each user. Therefore, it is important to keep this file up to date in order for Criteo to show the right data in your banners.
The following points need to be kept in mind:
- Each product must have a unique ID that must be identical to the one passed in the events.
- The catalog feed must contain all or at least most of your apps’ products for Retail apps, and hotels/airline routes for Travel apps.
- Recommended image resolution is 300x300 pixels to 400x400 pixels.
Note: In some instances (i.e live campaigns on mobile web or desktop), Criteo will already have the catalog feed.
For more information, please request the dedicated guide from your contact.
App Links & Deeplinks
Deep linking consists of a hyperlink that links to a specific, generally searchable, or indexed piece of content on an app.
Criteo requires custom native deeplinks to run a App campaign utilizing dynamic creative. These deeplinks use a custom protocol (e.g. sampleadvertiser://
) and, in most cases, optional parameters. The optional parameters may consist of a path and/or query parameters.
(e.g. sampleadvertiser://product/sku123
or sampleadvertiser://product?sku=123
).
For Android, we also strongly recommend Advertisers use Android App Links. Android App Links are HTTP URLs that bring users directly to specific content in your Android App. Android App Links can drive more traffic to your app, help you discover which app content is used most, and make it easier for users to share and find content in an installed app. For more information on App Links, please see Android Studio’s Add Android App Links article.
Criteo requires two kinds of App Links & custom native deeplinks:
- Opens to the homepage of the App.
- Opens to each product-details page.
Pass deep link events to Kochava using deepLinkEvent()
method. After retrieving the URI you receive from Android, just pass it as a parameter to the deepLinkEvent()
and Kochava will register that event specifically as a deeplink event. You can learn more about deep linking for the Android platform here.
The following is the sample code snippet to capture and pass the deeplink string to Kochava.
Uri data = intent.getData();
kTracker.deepLinkEvent(data.toString());
Testing process
Once all events and postbacks have been implemented, you should contact your Criteo representative to begin the testing phase.
Criteo requires the following elements:
- App build to test the collection of events on Criteo side.
- If testing remotely, the IDFA of the test device.
- (For Retargeting) Deeplink and Universal Link examples - homepage & product details page.