API Connector Documentation
Import Criteo Data to Google Sheets
In this guide, we’ll walk through how to import Criteo data directly into Google Sheets, using the API Connector add-on for Sheets.
Criteo uses the client credentials OAuth flow so we'll get your API credentials and set up a custom connector.
Contents
- Before You Begin
- Part 1: Create a Criteo App
- Part 2: Connect Criteo to API Connector
- Part 3: Pull Criteo Data into Sheets
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Create a Criteo
- If you haven't already, navigate to https://developers.criteo.com/ and log in with your existing Criteo account.
- Once logged in, you'll be redirected to the Criteo Developer Dashboard, and will be prompted to create an Organization. Provide your company name, country, company type, and email.
- Once you've created an Organization, you'll be redirected to the My Apps screen. Click Start building.
- You'll be prompted to select an authentication method. Choose Client credentials.
- Give your app a name, description and image, and click Create app
- You'll be asked to select the services you would like to access through your app (Marketing Solutions, Retail Media, or Publisher). This can't be changed, but you can always make a new app later.
- Click on Generate and download new key and you'll provided with a file containing an API Key (aka Client ID) and API Secret (aka Client Secret).
Part 2: Connect Criteo to API Connector
- Open up Google Sheets and click Extensions > API Connector > Manage Connections
- Scroll to the bottom of the sidebar and click Add Custom OAuth
- Fill in the Custom OAuth modal as follows:
- OAuth Grant Type:
Client Credentials
- Name:
Custom Criteo
- Token URL:
https://api.criteo.com/oauth2/token
- Client ID: API Key provided by Criteo
- Client Secret: API Secret provided by Criteo
- OAuth Grant Type:
- Click Save
Part 3: Get Criteo Data in Sheets
You can create a request using any of the endpoints and parameters described in Criteo's documentation. Select the custom OAuth connection you created above for each request.
Example #1
This request shows how to fetch your advertiser IDs, which you'll need for subsequent requests.
- Application:
Custom
- Method:
GET
- Request URL:
https://api.criteo.com/2023-01/advertisers/me
- OAuth:
Custom Criteo
Example #2
You can use the same setup to fetch data from any part of Criteo's API, by changing the request method and URL as directed in the documentation. For example, if you're fetching analytics stats, a request might look like this:
- Application:
Custom
- Method:
POST
- Request URL:
https://api.criteo.com/2023-01/statistics/report
- OAuth:
Custom Criteo
- Request body (json):
{"advertiserIds":"your_advertiser_id","startDate":"2023-01-01","endDate":"2023-10-01","format":"json","dimensions":["Campaign","AdsetId","Day"],"metrics":["Displays","Clicks","AdvertiserCost"],"timezone":"UTC","currency":"EUR"}
Part 4: API Documentation
Official documentation: https://developers.criteo.com/marketing-solutions/docs