Send query results to Google Audience Partner API

Google Audience Partner API uses first-party data that your customers have shared with you to enable advertising across Google – including search and display advertising, the Shopping tab, Gmail, and YouTube – to your customers and to similar audiences.

Note

This destination uses the Google Audience Partner API .

Changes to audiences are not immediately available in Google Audience Partner API. Allow for up to 48 hours after the point at which Amperity has finished sending audience updates for them to be available.

Important

Amperity requires access to Google Audience Partner API. This access may expire or be removed periodically, depending on how OAuth is managed at Google Audience Partner API. If Amperity is unable to send data to Google Audience Partner API ask your DataGrid Administrator to reauthorize access to Google Audience Partner API.

This topic describes the steps that are required to send customer data to Google Audience Partner API from Amperity:

  1. Build a query

  2. Add orchestration

  3. Run orchestration

Note

Google Audience Partner API must be enabled before you can configure an orchestration to send query results. Ask your DataGrid Operator or Amperity representative to enable Google Audience Partner API for your tenant.

Build query

You will need to build a query that outputs fields that can be mapped to Google Audience Partner API matching keys, one of:

  1. Contact information, including personally identifiable information (PII) matching

  2. Mobile device matching

  3. Advertiser-generated and assigned user ID matching.

Note

The Google Audience Partner API has specific requirements. Define a query, and then export it as a CSV file to profile the data.

  • Add and normalize the country code when states are US and Canada, but the country is NULL.

  • Phone numbers are required to have a +11231234567 format.

  • First name, last name, zip code, and country are all required for the “Contact Info” upload key. If any are missing, none are passed.

Example

SELECT
  Email AS email,
  concat('+',regexp_replace(Phone, '(\s*)([^a-zA-Z0-9])', '')) AS phone,
  LastName AS lastname,
  FirstName AS firstname,
  PostalCode AS zip,
  'US' AS country
FROM Customer360

WHERE
  email IS NOT NULL AND
  Phone IS NOT NULL AND
  FirstName IS NOT NULL AND
  LastName IS NOT NULL AND
  PostalCode IS NOT NULL

LIMIT 1000

Add orchestration

An orchestration defines the relationship between query results and a destination, including the location to which those query results will be sent and the frequency at which the orchestration will be run.

To add an orchestration

  1. From the Destinations tab, click Add Orchestration. This opens the Add Orchestration dialog box.

  2. From the Object Type drop-down, select Query.

  3. From the Object drop-down, select the query for which results will be sent to Google Audience Partner API.

  4. From the Destination drop-down, select a destination that is configured for sending data to Google Audience Partner API.

  5. From the Data Template drop-down, select a data template.

  6. Verify all settings.

  7. Set the workflow to Manual. (You can change this to automatic later, after verifying the end-to-end workflow.)

  8. Click Save.

Run orchestration

Run the orchestration manually to validate that it works.

To run the orchestration

  1. From the Destinations tab, under Orchestrations, open the    menu for the Google Audience Partner API orchestration, and then select Run.

  2. The Status column for the orchestration will update to say “Waiting to start…”, after which the notifications pane will update to include a notification that shows the current status.

  3. When the orchestration has run successfully, the status is updated to “Completed”.

Google Audience Partner API Matching

Google Audience Partner API matching can be done through the following list ID types:

Contact Info Matching

Personally identifiable information (PII) is any data that could potentially identify a specific individual. PII data includes details like names, addresses, email addresses, and other profile attributes, but can also include attributes like a loyalty number, customer relationship management (CRM) system identifiers, and foreign keys in customer data.

A list can be matched to contact information that contains PII data. If a row contains a NULL value, it will be automatically filtered out by the connector and will be shown in the error logs. Each field should be matched to (at least) one of the following columns:

Amperity Column

Google API Key

Description

Email Address

email

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Hashes data as SHA-256

Phone Number

phone

Converts each phone number to E.164 format which represents a phone number as a number up to fifteen digits in length (without spaces) that starts with a + symbol. For example: +12061234567.

For this key, the connector:

  • Trims leading and trailing whitespace

  • Hashes data as SHA-256

Last Name

lastname

For this key, the connector:

  • Trims leading and trailing whitespace

  • Removes spaces in-between

  • Converts to lower-case

  • Hashes data as SHA-256

First Name

firstname

For this key, the connector:

  • Trims leading and trailing whitespace

  • Removes spaces in-between

  • Converts to lower-case

  • Hashes data as SHA-256

Zip Code

zip

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

Country Code

country

A two-letter country code in ISO 3166-1 alpha-2 format.

For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to upper-case

Mobile Device ID Matching

A list can be matched to mobile device IDs. These may be identifier for advertising (IDFA) or Google advertising IDs (AAID) for mobile devices. If a row contains a NULL value, it will be automatically filtered out by the connector and will be shown in the error logs.

Amperity Column

Google API Key

Description

Mobile Device ID

mobile-id

A list of mobile device IDs provided to Amperity by the customer. For this key, the connector:

  • Trims leading and trailing whitespace

  • Converts to lower-case

  • Retains any hyphens in the mobile device ID

User ID Matching

A list can be matched to advertiser-generated and assigned user IDs and/or to custom IDs created by the customer. This list of IDs must be provided to Amperity by the customer so they may be returned as part of the query data sent to Google Audience Partner API. If a row contains a NULL value, it will be automatically filtered out by the connector and will be shown in the error logs.

Amperity Column

Google API Key

Description

User ID

user-id

A list of customer IDs provided to Amperity by the customer. For this key, the connector:

  • Trims leading and trailing whitespace

  • Optional. Hashes data as SHA-256