Criteo plugin integration

You can integrate the Adjust SDK with Criteo events by using the Adjust Criteo plugin.

Before you begin

Availability

You need to download and set up the Adjust SDK for your platform. Follow the instructions linked below to get started.

⚙️ iOS / Android / React

Set up your environment

iOS

CocoaPods

Carthage

Install from source

Android

Maven

Add as JAR

React

In your .js file, add the following import statement:

import { Adjust, AdjustEvent, AdjustConfig } from 'react-native-adjust';`

In your App.js file, initialize the Adjust SDK with the following code:

constructor(props) {
    super(props);
    const adjustConfig = new AdjustConfig("{YourAppToken}", AdjustConfig.EnvironmentSandbox);
    Adjust.create(adjustConfig);
}

componentWillUnmount() {
  Adjust.componentWillUnmount();
}

Replace {YourAppToken} with the app token found in your Adjust dashboard.

Work with Criteo events

Once you have set up your environment, you can start recording Criteo events with the Adjust SDK.

View listing

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{viewListingEventToken}"];

NSArray *productIds = @[@"productId1", @"productId2", @"product3"];

[ADJCriteo injectViewListingIntoEvent:event productIds:productIds];

[Adjust trackEvent:event];

View product

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{viewProductEventToken}"];

[ADJCriteo injectViewProductIntoEvent:event productId:@"productId1"];

[Adjust trackEvent:event];

Cart

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{cartEventToken}"];

ADJCriteoProduct *product1 = [ADJCriteoProduct productWithId:@"productId1" price:100.0 quantity:1];
ADJCriteoProduct *product2 = [ADJCriteoProduct productWithId:@"productId2" price:77.7 quantity:3];
ADJCriteoProduct *product3 = [ADJCriteoProduct productWithId:@"productId3" price:50 quantity:2];
NSArray *products = @[product1, product2, product3];

[ADJCriteo injectCartIntoEvent:event products:products];

[Adjust trackEvent:event];

Transaction confirmation

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{transactionConfirmedEventToken}"];

ADJCriteoProduct *product1 = [ADJCriteoProduct productWithId:@"productId1" price:100.0 quantity:1];
ADJCriteoProduct *product2 = [ADJCriteoProduct productWithId:@"productId2" price:77.7 quantity:3];
ADJCriteoProduct *product3 = [ADJCriteoProduct productWithId:@"productId3" price:50 quantity:2];
NSArray *products = @[product1, product2, product3];

[ADJCriteo injectTransactionConfirmedIntoEvent:event products:products 
  transactionId:@"transactionId1" newCustomer:@"newCustomerId"];

[Adjust trackEvent:event];

User level

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{userLevelEventToken}"];

[ADJCriteo injectUserLevelIntoEvent:event uiLevel:1];

[Adjust trackEvent:event];

User status

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{userStatusEventToken}"];

[ADJCriteo injectUserStatusIntoEvent:event uiStatus:@"uiStatusValue"];

[Adjust trackEvent:event];

Achievement unlocked

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{achievementUnlockedEventToken}"];

[ADJCriteo injectAchievementUnlockedIntoEvent:event uiAchievement:@"uiAchievementValue"];

[Adjust trackEvent:event];

Custom event

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{customEventEventToken}"];

[ADJCriteo injectCustomEventIntoEvent:event uiData:@"uiDataValue"];

[Adjust trackEvent:event];

Custom event 2

Objective-C
Swift
Java
#import "ADJCriteo.h"

ADJEvent *event = [ADJEvent eventWithEventToken:@"{customEvent2EventToken}"];

[ADJCriteo injectCustomEvent2IntoEvent:event uiData2:@"uiDataValue2" uiData3:3];

[Adjust trackEvent:event];

Hashed email

You can attach a hashed email to every Criteo event. To do this, call the injectHashedEmailIntoCriteoEvents method. The SDK will send a hashed email with every Criteo event for the duration of the app lifecycle. This means it will need to be set again when the app is re-launched. You can remove the hashed email by setting the injectHashedEmailIntoCriteoEvents value to nil.

Objective-C
Swift
Java
#import "ADJCriteo.h"

[ADJCriteo injectHashedEmailIntoCriteoEvents:@"8455938a1db5c475a87d76edacb6284e"];

Search dates

You can attach a check-in and check-out date to every Criteo event. To do this, call the injectViewSearchDatesIntoCriteoEvent method. The SDK will send the dates with every Criteo event for the duration of the app lifecycle. This means you will need to set them again when the app is re-launched.

You can remove the search dates by setting the injectViewSearchDatesIntoCriteoEvent values to nil.

Objective-C
Swift
Java
#import "ADJCriteo.h"

[ADJCriteo injectViewSearchDatesIntoCriteoEvents:@"2015-01-01" checkOutDate:@"2015-01-07"];

Partner id

You can attach a partner ID to every Criteo event. To do this, call the injectPartnerIdIntoCriteoEvents method. The SDK will send the partner ID with every Criteo for the duration of the app lifecycle. This means you will need to set it again when the app is re-launched.

You can remove the partner ID by setting the injectPartnerIdIntoCriteoEvents value to null.

Objective-C
Swift
Java
#import "ADJCriteo.h"

[ADJCriteo injectPartnerIdIntoCriteoEvents:@"{criteoPartnerId}"];

Send deep link

You can add deep link information to Criteo events. To do this, call the injectDeeplinkIntoEvent method with the event and URL.

Objective-C
Swift
Java
#import "ADJCriteo.h"

- (BOOL)  application:(UIApplication *)application openURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    ADJEvent *event = [ADJEvent eventWithEventToken:@"{deeplinkEventToken}"];
    
    [ADJCriteo injectDeeplinkIntoEvent:event url:url];
    
    [Adjust trackEvent:event];

    //...
}

Customer ID

You can attach a customer ID to every Criteo event. To do this, call the injectCustomerIdIntoCriteoEvents method. The SDK will send the customer ID with every Criteo event for the duration of the app lifecycle. This means you will need to set them again when the app is re-launched.

You can remove the customer ID by setting the injectCustomerIdIntoCriteoEvents value to nil.

Objective-C
Swift
Java
#import "ADJCriteo.h"

[ADJCriteo injectCustomerIdIntoCriteoEvents:@"{CriteoCustomerId}"];

User segment

You can attach the user segment to every Criteo event. To do this, call the injectUserSegmentIntoCriteoEvents method. The SDK will send the user segment with every Criteo event for the duration of the app lifecycle. This means you will need to set it again when the app is re-launched.

You can remove the user segment by setting the injectUserSegmentIntoCriteoEvents value to nil.

Objective-C
Swift
Java
#import "ADJCriteo.h"

[ADJCriteo injectUserSegmentIntoCriteoEvents:@"{CriteoUserSegment}"];