You can write job results from Arm Treasure Data directly to Criteo Marketing API.
- Basic knowledge of Treasure Data, including the toolbelt
- A Criteo Marketing API account
- Authorized Treasure Data account access to Criteo
Use the TD Console to create your connection
You can use the Treasure Data console to configure your connection.
Create a new connection
You must create and configure the data connection to be used during export, prior to running your query. As part of the data connection, you provide authentication to access the integration.
Go to Catalog and search and select Criteo.
The following dialog opens.
Authenticating your connection
You need a client ID and client secret to authenticate using credentials. To get a client ID and client secret, use the Criteo Management Center. A Criteo Marketing Account is required to use the Management Center.
Click Setup > Users.
Then click CREATE API USER.
Enter a contact Email address and select one of the following roles:
- View only
- Business Manager
- Financial Manager
To use the Criteo Marketing API, select Business Manager. The View only and Financial Manager roles don’t have enough privileges to input and pull data through the API.
When done, click Add user. You receive a confirmation message that includes your
Client ID and
Client Secret. Save the information because you use it later to configure the Criteo data connector.
Configure Export Results in Your Data Connection
In this step, you create or reuse a query. In the query, you configure the data connection.
Note: Sometimes you need to define the column mapping in the query.
Configure the Connection by Specifying the Parameters
Go to the TD console. Go to Data Workbench > Queries. Access the query that you plan to use to export data.
Click Export Results located at top of your query editor. The Choose Integration dialog opens. Type the connection name in the search box to filter and select your connection.
- Advertiser ID (required): The ID used to group audiences under.
- Maximum Identities Per Request (optional): The maximum number of IDs to include per request. The maximum number for the Criteo interface is 50000. Default: 50000
- Retry Limit (optional): Number of times to attempt a network operation. Default: 7
- Connect Timeout in Seconds(optional): The time, in seconds, to wait until aborting a connection operation. Default: 300, which is equivalent to 5 minutes.
- Read Timeout in Seconds (optional): The time, in seconds, to wait until aborting a read operation. Default: 900, which is equivalent to 15 minutes.
- Write Timeout in Seconds (optional): The time, in seconds, to wait until aborting a write operation. Default: 900, which is equivalent to 15 minutes.
The following is a sample configuration:
Example of a Query to Populate Criteo
From Treasure Data, run the following query with Export Results into a connection for Criteo:
SELECT audience_id_column AS id, audience_name_column AS name,
operation_column AS operation, schema_column AS schema,
userid_column AS userid, gumid_column AS gumid FROM your_table;
Optional: Use of Scheduled Jobs for Output
You can use Scheduled Jobs with Result Output, to periodically write the output result to a target destination that you specify.
Optional: Configure Export Results in Workflows
Within Treasure Workflow, you can specify the use of the data connector to output data.
Click here for more information on using data connectors in Workflows to export data.
FAQ for Export into Criteo
Q: Are both the audience ID and audience name required to not be NULL?
- No. Either the audience ID or audience name must be non-NULL, not both. If the audience ID and audience name are both provided, then the values must be present within the same audience.
Q: If audience ID or audience name do not exist in the list of audiences, will they be created?
- If an audience name is provided and the audience ID is NULL, an audience is created if the audience name is not found in the list of audiences.
- If an audience ID is provided, an audience cannot be created if the audience ID is not found in the list of audiences. The Criteo API does not allow the audience ID to be specified when creating an audience.
Q: How long does it take for my audience to be updated when adding or removing users?
- Criteo can take up to 24 hours to process the data and make it available for display. The data is stored in Criteo's system, but takes some time to be processed.
FAQ for Log Messages
Q: Log: Columns [<name(s)>] were not found.
- The column names listed in the message were missing from the query.
- Check the query to ensure that the column names are not missing or they are not misspelled.
Q: Log: Created audience id '<id>' for audience name '<name>'
- The audience name was not found within the list of audiences for the advertiser ID provided. The audience is created only if the name does not exist and the ID value provided by the query is NULL.
Q: Log: Audience id '<id>' is not found in the list of audiences for advertiser '<id>'. Cannot create a new audience for non-existent id
- If the audience ID value provided by the query is not NULL and the audience ID does not exist within the list of audiences for the advertiser ID provided, then the audience cannot be created by the connector. The audience ID provided does not match the audience ID generated by the Criteo API and causes a data mismatch.
- Create an audience and update data entries of unknown audience IDs with newly created audience IDs.
Q: Log: Audience name '<name>' is not found in the list of audiences for advertiser '<id>' but audience id '<id>' is found. Cannot create a new audience due to name mismatch
- Both the audience ID and name were provided by the query but the audience name was not found in the list of audiences for the advertiser ID provided. Providing the name as part of the Criteo API operation is invalid.
- Make the name NULL in the database or update the audience name to match the name provided by the query.
Q: Log: Audience id '<id>' and audience name '<name>' do not represent the same audience for advertiser '<id>'
- The audience name associated with ID does not match the audience name provided by the query.
- If both the audience ID and name are provided by the query and are not NULL, both values must be associated with the same audience. You can update the audience name associated with the ID to match the name provided by the query or you can modify the row of data and set the name to match the name value within the audience.
Data exported to Criteo must follow the Criteo schema. Supported column names are:
- id : The audience ID
- name : The audience name
- operation : The operation (add or remove) to perform on an audience
- schema : The type of identifier represented in the row of data
- userid : The identifier to add or remove from an audience
- gumid : The GUM caller ID, data required for gum schema