Skip to main content
Table of contents

Introduction

Welcome! This document will explain integrating with Commerce Grid's Prebid solution.

If you are starting a Prebid implementation from scratch, please refer to Prebid's How-to documentation here.

Requirements

You will receive from Criteo

  • A list of identifiers for each ad placement and/or format you have available on the page

You will need to

  • Download prebid.js from Prebid.org or manually build from Github, including the Criteo adapter and the required modules.

  • Map the placements available on each page with the Criteo networkId

  • Criteo complies with the IAB Consent Framework. Please refer to their documentation for more information and examples of certified CMPs.

  • Allow the Criteo bid adapter to have access to the storage (CF next section)

Prebid 7

Prebid 7, set released in June 2022, contains a certain number of breaking changes: https://github.com/prebid/Prebid.js/issues/7796

One of these breaking changes corresponds to the ability for bid adapters to have access to the website's storage (first-party cookie and/or localStorage): https://github.com/prebid/Prebid.js/pull/8279

Criteo bid adapter relies on the access to the storage for several key features, including for identification purposes. Keeping this access allows you to maintain the monetisation of your inventory via CDB.

Chrome Privacy Sandox

Criteo is committed to testing the different Privacy Sandbox APIs during the Market Testing organised by UK's CMA in H1 2024.
In terms of setup for publishers, the 2 most important ones are Protected Audience and Topics API.

Chrome Privacy Sandox - Topics API

Criteo will automatically collect the Topics corresponding to the user via the HTTP headers (more info).
Hence, no action is required by publishers in order for Criteo to collect their own Topics.

Chrome Privacy Sandox - Recommended: Protected Audience API for Prebid 8.42+

There are up to 5 steps in the setup

1. Download or build Prebid with support for the FledgeForGpt module
2. PAAPI module configuration
3. Invoke setPAAPIConfigForGPT(); at end of an auction.
4. AdUnits configuration (optional)
5. Bidder configuration (optional)

Download or build Prebid with FledgeForGpt module

Criteo's Prebid bid adapter supports PAAPI as of prebid v8.42.0. An upgrade to prebid v8.42.0 or later is required (link).

Prebid's "paapi" and "fledgeForGpt" modules must also be included in the build (link).

The "fledgeForGpt" module is a submodule of the "paapi" module which requires the "paapi" module to function. Including the "fledgeForGpt" module in the build will automatically include the "paapi" module.

This can be done via the downloader on the prebid download page or by using the --modules flag when building prebid.

For more information on how to build prebid, please refer to the prebid github page.

Paapi module configuration

It supports the following parameters:

Parameter

Type

Description

Default

Notes

enabled

boolean

Whether the module is enabled

false

set to true to enable the module

bidders

array

List of bidders to enable Fledge for

[]

set to [] to enable Fledge for all bidders

defaultForSlots

number

The default auction environment to use for adunits

0

set to 1 to enable Fledge for all adunits

gpt.autoconfig

boolean

Whether to enable autoconfig for GPT

true

set to false to disable autoconfig

PAAPI support is disabled by default. To enable it, set the enabled value to true for this module.

As of March 27th 2024, gpt.autoconfig needs to be set to false in order to avoid gpt missing out PAAPI bids due to a racing condition in the "fledgeForGpt" module.

You can set an optional default value for the defaultForSlots parameter, which will be used as an auction environment for all adunits that do not have the ortb2Imp.ext.ae flag set. Criteo recommends enabling FLEDGE for all adunits by setting defaultForSlots to 1.

Invoke setPAAPIConfigForGPT at the end of an auction

By default, Prebid.js attempts to configure GPT slots for PAAPI at the end of each auction. This requires GPT to be loaded before the first Prebid auction is started; to avoid this racing condition, you need to invoke setPAAPIConfigForGPT() at the end of an auction. This can typically be done in the bidsBackHandler function.

AdUnits configuration (optional)

All adunits can be opted-in to FLEDGE in the module config via the defaultForSlots parameter. If needed, adunits can be configured individually by setting ortb2Imp.ext.ae for that adunit. This attribute will take precedence over defaultForSlots setting. To enable FLEDGE on ad-unit level, ortb2Imp.ext.aemust be set to1` as shown in the example on the right (more info).

Bidder Configuration (optional)

Name

Type

Description

Notes

fledgeEnabled

boolean

Enable/disable a bidder to participate in FLEDGE

Defaults to false

defaultForSlots

number

Default value for imp.ext.ae in requests for specified bidders

Should be 1

In addition to enabling FLEDGE at the module level, individual bidders can also be enabled/disabled. To enable one or more bidders, use the setBidderConfig method of Prebid.js.

Deprecated: Protected Audience API for Prebid 8.36-

There are 4 steps in the setup:

  1. Requirements in terms of build

  2. FledgeForGpt module activation

  3. FledgeEnable flag for Criteo bidder

  4. AdUnits configuration

REQUIREMENTS IN TERMS OF BUILD

Criteo Prebid bid adapter supports Fledge as of version 8.22.0. An upgrade to 8.22.0 or higher is required (link).
Prebid's fledgeForGpt module must also be included in the build (link)

FLEDGEFORGPT MODULE ACTIVATION

FledgeForGPT must be enabled on the global config level.

FLEDGEENABLE FLAG FOR CRITEO BIDDER

Additionally fledge must be enabled on the bidder config level.

ADUNITS CONFIGURATION

To enable an ad unit for fledge, ortb2Imp.ext.ae must be set to 1 as shown in the example on the right (more info).

Registering the CGrid Criteo bidder

As part of our Commerce Grid rollout, we have introduced new fields for inventory mapping. The CGrid platform will use 'Inventory Groups' to manage your inventory, based in Bidder Params and firstPartyData prebid features.

Registering the CGrid Criteo bidder - Publisher ID setup

Each inventory group will be tied to a Publisher Id. Publisher Id can be a unique ID provided by the publisher and mapped on Criteo side, or by default we will use the ID provided for ads.txt.

OPTION 1

Publisher ID can be passed through ortb2.site.publisher.id to bidder config.

OPTION 2

As of Prebid v8.47 publishers may instead pass this ID through pubid under Criteo bid params, along with networkId. Note that receiving the id under ortb2 object as above is still supported as well so publishers can choose either option.

Registering the CGrid Criteo bidder - Ad Unit ID Setup

The information below details how to pass CGrid adunit Ids instead of pub Ids. Integration below only needs to be used for cases where pub Id integration is not sufficient and Adunit mapping is required.

OPTION 1

Publisher should pass the adunit Id from the Grid UI under the adunit config under ortb2Imp.ext.bidder.uid

OPTION 2

As of Prebid v8.47 publishers may instead pass this ID through uid under Criteo bid params along with networkId. Note that receiving the id under ortb2 object as above is still supported as well so publishers can choose either option.

Registering the Criteo bidder - Global placement ID (GPID)

As documented in the Prebid documentation

Registering the Criteo bidder - Include publishertag library

In order to maximize your revenue, we highly recommend implementing Criteo's publishertag library. You can do so by defining a version string for "fastBidVersion" in Criteo's config.

Value

Comment

Description

'latest'

recommended

Prebid will always load the latest publishertag version

'none'

NOT recommended

Prebid won't load publishertag

<version string>

e.g. '109'

Prebid will load publishertag in the provided version.

Chrome Privacy Sandbox

Criteo is committed to testing the different Privacy Sandbox APIs during the Market Testing organised by UK's CMA in H1 2024.
In terms of setup for publishers, the 2 most important ones are Protected Audience and Topics API.

Topics API

Criteo will automatically collect the Topics corresponding to the user via the HTTP headers (more info).
Hence, no action is required by publishers in order for Criteo to collect their own Topics.

Protected Audience API

There are 4 steps in the setup:

  1. Requirements in terms of build

  2. FledgeForGpt module activation

  3. FledgeEnable flag for Criteo bidder

  4. AdUnits configuration

REQUIREMENTS IN TERMS OF BUILD

Criteo Prebid bid adapter supports Fledge as of version 8.22.0. An upgrade to 8.22.0 or higher is required (link).
Prebid's fledgeForGpt module must also be included in the build (link)

FLEDGEFORGPT MODULE ACTIVATION

FledgeForGPT must be enabled on the global config level.

FLEDGEENABLE FLAG FOR CRITEO BIDDER

Additionally fledge must be enabled on the bidder config level.

ADUNITS CONFIGURATION

To enable an ad unit for fledge, ortb2Imp.ext.ae must be set to 1 as shown in the example on the right (more info).

User ID Collection

As documented in the Prebid documentation, Criteo collects all IDs generated by Prebid User ID modules, including SharedID and other third-party ID solutions.
If you are using SharedID, please consider implementing SharedId First Party endpoint to make the ID more persistent.

To enrich the bid request data with user IDs not available via these modules (first-party user IDs, third-party IDs or hashed emails for instance), please use pbjs.setBidderConfig() to pass an eids array as explained in the below sections.
The eids field should be an array of OpenRTB EIDS objects.

User ID Collection - Prebid 6.23+ versus older versions

The below examples on the right correspond to the supported way to pass the "eids" array on Prebid 6.23+, including Prebid 7, namely via "ortb2.user.ext.data.eids".


On Prebid 6.23+, our bid adapter also supports "ortb2.user.ext.eids" which corresponds to the OpenRTB standard.

User ID Collection - Hashed Emails

Use the function pbjs.setBidderConfig() providing the data below (examples on the right):

  • (optional) source: your domain or the domain of the solution operating on your behalf

  • id: the hashed email

  • atype: 3

  • ext.stype: hashing algorithm used: cleartextemail, hemsha256, hemmd5, hemsha256md5. Please refer to next section for details on hashing formats.

HASHING FORMATS

The hashing should be the users' email address:

  • Encoded in UTF-8

  • Trimmed of any white space (eg: "test@criteo.com " should become "test@criteo.com")

  • Converted to lower case

  • Hashed with MD5 or SHA256 or SHA256(MD5) & output as ASCII text

Example:

  • Type: String

  • Original Email: john.doe@gmail.com

  • SHA256: 375320dd9ae7ed408002f3768e16cb5f28c861062fd50dff9a3bff62e9dce4ef

  • MD5: e13743a7f1db7f4246badd6fd6ff54ff

  • SHA256 of MD5: 000e3171a5110c35c69d060112bd0ba55d9631c7c2ec93f1840e4570095b263a

Helpful links: https://www.miraclesalad.com/webtools/md5.php and https://www.miraclesalad.com/webtools/sha256.php

User ID Collection - First Party IDs

Use the function pbjs.setBidderConfig() providing the data below (examples on the right):

  • source: your domain

  • id: the user identifier

  • atype: Must be 1 for cookie/device-based ID, must be 3 for person-based ID (e.g.: authenticated user ID, login ID, CRM/customer ID)

  • ext.stype: ppuid

  • ext.persistence: js or http

User ID Collection - Third Party IDs

Use the function pbjs.setBidderConfig() providing the data below (examples on the right):

  • source: the third-party solution domain

  • id: the user identifier

  • (recommended) atype: 1 for cookie/device based ID, 3 for person-based ID (e.g.: authenticated user ID, login ID, CRM/customer ID)

  • (optional) ext.persistence: js or http

User ID Collection - Custom data segments

Criteo Prebid adapter supports two main bid request object nodes for sellers' defined data:

PREBID COMPLIANCE

To pass the custom cohorts data using one of the oRTB2.5 objects mentioned above, please use the pbjs.setConfig() method as the example aside.

In order to comply with the method for passing real-time data by ortb2.user.data using pbjs.setConfig, please make sure your Prebid version is 6.10+.

PREBID RTD MODULES

The Criteo bid adapter is by default integrated with any real-time data (RTD) Prebid module that utilizes the ortb2 object to store and pass the audience and context information, for example, the JW Player and Permutive modules.

Google Ad Manager Setup

If this is the first time you are setting up a Prebid campaign in Google Ad Manager, please contact your Criteo Account Manager for help. Please check the official Prebid documentation here for a detailed step-by-step description.


You can integrate Prebid in two modes:

Google Ad Manager Setup - Standard / Mediation mode on

Not recommended

Prebid will provide keywords only for the winning bids:

Keyname

Example

Description

hb_bidder

hb_bidder=criteo

The winner

hb_adid

hb_adid=xxxyyyzzz

The ad Id used by the ad server creative to render the correct ad

hb_pb

hb_pb=2.50

The bid price bucket used to target the respective line item.

hb_size

hb_size=300x250

The ad format

The keyword hb_pb is used to define the line item targeting criteria (image below), and hb_adid at the creatives (code to the left).

hb_pb.png
16.5 KB

Google Ad Manager Setup - Send all bids / Mediation off

Recommended

This makes use of the function pbjs.enableSendAllBids() in order to provide keywords for all bidders. More details on http://prebid.org/dev-docs/examples/send-all-bids.html and http://prebid.org/adops/send-all-bids-adops.html

For Criteo especifically:

Keyname

Example

Description

hb_adid_criteo

hb_adid_criteo=xxxyyyzzz

The ad Id used by the ad server creative to render the correct ad

hb_format_criteo | hb_format_criteo=banner | This will ensure that the appropriate ad server line item is activated for banner / outstream bids hb_pb_criteo | hb_pb_criteo=2.50 | The bid price bucket used to target the respective line item. hb_size_criteo | hb_size_criteo=300x250 | The ad format

You will also require to implement one dedicated set of line items for Criteo using the keyword hb_pb_criteo for the line item targeting criteria (image below), and hb_adid_criteo at the creatives (code to the left).

hb_pb_criteo.png
17.1 KB

Google Ad Manager Setup - Line item Creation tool

Criteo offers a tool to help doing the initial Prebid setup. You will need to enable API access and share Google Ad Manager access with Criteo. Please contact your Criteo Account Manager for more details.

AMP

Criteo's solution is compatible with AMP RTC. Please refer to this dedicated AMP guide for more details.

Video

Criteo supports video ads. Please refer to this guide for more details.

Native ads

We recommend to use Prebid.js native implementation. Please refer to this official Prebid guide for more details.

Ad requirements

Criteo Native guidelines:

  • Display the adchoices icon and implement the link to the opt-out page

  • Display at least one advertiser information (domain, name)

  • Display at least one product recommendation

  • Use Criteo click URLs

  • Every impression pixel must be called once the ad is delivered

Product images


Criteo images for native inventory will be sized to fit within a 400x400 html element. They will not be padded to fit the dimensions or ratio, they should therefore be centered in the layout by the partner.

Native ads (deprecated) - Native Placement

The original native implementation described below is still valid but we discourage its use.

In order to activate Native demand, first you need to declare a callback function that will be used to render the Native ad. This section provides instructions on how to build a native ad.

Native ads (deprecated) - Native Object

When a native demand is available, Criteo will return the following native object:

NATIVE OBJECT

Field

Type

Description

product

Product object Array

List of product assets.

advertiser

Advertiser object

Includes the adv name and logo

privacy

Privacy object

Includes adchoices and opt-out url

impression_pixels

Impression pixels object Array

List of impression pixels

PRODUCT OBJECT

Field

Type

Description

title

String

Product title.

description

String

Product description.

price

String

Product formatted price. It comes formatted by default with the currency symbol.

click_url

String

Product landing page

call_to_action

String

Product CTA

image

Image object

Product image (400x400 px)

IMAGE OBJECT

Field

Type

Description

url

String

Image URL.

height

Integer

Image height

width

Integer

Image width

ADVERTISER OBJECT

Field

Type

Description

description

String

Advertiser name

domain

String

Advertiser domain

logo

Image object

Advertiser logo (200x200 px)

PRIVACY OBJECT

Field

Type

Description

optout_click_url

String

Opt-out landing page URL

optout_image_url

String

Adchoices icon URL

IMPRESSION PIXEL OBJECT

Field

Type

Description

url

String

Impression pixel beacon

Native ads (deprecated) - Adserver integration

The campaigns are configured as the normal campaign and you can reuse the same Creative codes for the standard ads. Prebid will automatically identify the native ad context and execute whatever has been defined at the nativeCallback parameter.

Native ads (deprecated) - Ad requirements

Criteo Native guidelines:

  • Display the adchoices icon and implement the link to the opt-out page

  • Display at least one advertiser information (domain, name)

  • Display at least one product recommendation

  • Use Criteo click URLs

  • Every impression pixel must be called once the ad is delivered

You will find to the right one sample code that uses the most relevant assets.

Native ads (deprecated) - Product images

Criteo images for native inventory will be sized to fit within a 400x400 html element. They will not be padded to fit the dimensions or ratio, they should therefore be centered in the layout by the partner.

Native ads (deprecated) - Complete example

You will find a full example on this page.