Configure destinations

Each Destination in an IngestAudienceMembersRequest or IngestEventsRequest defines:

  1. The account that receives the data. For example, a Google Ads account or a Google Analytics property.
  2. The destination entity for the data within the account, such as a Google Ads conversion action or a Google Analytics stream.
  3. The access path for the request's credentials to the account that receives the data.

If you're an advertiser or an agency, jump to the Advertiser scenarios for examples of how to construct a Destination:

If you're a data partner, jump to the Data partner scenarios for examples of how to construct a Destination to send data to an account with a product link to your data partner account:

The Detailed requirements section covers the requirements and validation rules in depth.

Advertiser scenarios

Here's how to configure a Destination for common scenarios for advertisers and agencies. This diagram shows how the Data Manager API uses the credentials and Destination fields to access the advertiser account.

Advertiser access path

Google Ads

Here's a diagram showing an example of a set of Google Ads accounts and users.

Google Ads accounts and users

Manager account M1

M1 has two direct child accounts:

  1. Manager account M2
  2. Client account C1

Google Account cloudysanfrancisco@gmail.com is a user in M1.

Manager account M2

M2 has two direct child accounts:

  1. Client account C1
  2. Client account C2

Google Account baklavainthebalkans@gmail.com is a user in M2.

Client account C1

C1 has two direct parent manager accounts:

  1. Manager account M1
  2. Manager account M2

Google Account jeffersonloveshiking@gmail.com is a user in C1.

Client account C2

Manager account M2 is the only direct parent of C2.

None of the Google Accounts listed is a user in C2.

The Direct access scenario and Manager access scenario show how you'd configure a destination to send data to these accounts.

Direct access scenario

If you want to send data to a Google Ads account and your credentials are for a Google Account that's a user in the Google Ads account:

Destination
operating_account
account_id The customer ID of the Google Ads account
account_type GOOGLE_ADS
login_account Either don't set the login_account, or set to the same values as operating_account.
linked_account Don't set the linked_account field.
product_destination_id The ID of the audience or conversion action.

Here's an example of a direct access scenario, using the accounts from the diagram and credentials for Google Account jeffersonloveshiking@gmail.com.

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "C1_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"

      },
      "loginAccount": {
        "accountId": "C1_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"

      },
      "productDestinationId": "USER_LIST_ID"
    }
  ]
}

Manager access scenario

If you want to send data to a Google Ads account and your credentials are for a Google Account that's a user in a Google Ads manager account where the advertiser account is a child account:

Destination
operating_account
account_id The customer ID of the Google Ads client account
account_type GOOGLE_ADS
login_account
account_id The customer ID of the Google Ads manager account
account_type GOOGLE_ADS
linked_account Don't set the linked_account field.
product_destination_id The ID of the audience or conversion action.

Here's an example of a manager access scenario for Google Ads client account C2 from the diagram and credentials for Google Account baklavainthebalkans@gmail.com:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "C2_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"
      },
      "loginAccount": {
        "accountId": "M2_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"
      },
      "productDestinationId": "USER_LIST_ID"
    }
  ]
}

Here's another example of a manager access scenario for Google Ads client account C2 and credentials for Google Account cloudysanfrancisco@gmail.com, which is a user on Google Ads manager account M1:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "C2_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"
      },
      "loginAccount": {
        "accountId": "M1_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"
      },
      "productDestinationId": "USER_LIST_ID"
    }
  ]
}

Display & Video 360

You can send data to a Display & Video 360 using two approaches:

  1. Direct access, where the credentials are for a Google Account that's a user in the Display & Video 360 advertiser or partner account.
  2. Display & Video 360 partner access, where the credentials are for a Google Account that's a user in the Display & Video 360 partner account, and the operating account is a Display & Video 360 advertiser account under the partner account.

Direct access scenarios

If you want to send data to a Display & Video 360 advertiser account and your credentials are for a Google Account that's a user in the advertiser account:

Destination
operating_account
account_id The ID of the Display & Video 360 advertiser account
account_type DISPLAY_VIDEO_ADVERTISER
login_account Either don't set the login_account, or set to the same values as operating_account.
linked_account Don't set the linked_account field.
product_destination_id The ID of the audience.

Here's an example of a Destination for a direct access scenario to send data to a Display & Video 360 advertiser:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "ADVERTISER_ID",
        "accountType": "DISPLAY_VIDEO_ADVERTISER"
      },
      "loginAccount": {
        "accountId": "ADVERTISER_ID",
        "accountType": "DISPLAY_VIDEO_ADVERTISER"
      },
      "productDestinationId": "AUDIENCE_ID"
    }
  ]
}

Similarly, if you want to send data to a Display & Video 360 partner account and your credentials are for a Google Account that's a user in the partner account:

Destination
operating_account
account_id The ID of the Display & Video 360 partner account
account_type DISPLAY_VIDEO_PARTNER
login_account Either don't set the login_account, or set to the same values as operating_account.
linked_account Don't set the linked_account field.
product_destination_id The ID of the audience.

Here's an example of a Destination for a direct access scenario to send data to a Display & Video 360 partner:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "PARTNER_ID",
        "accountType": "DISPLAY_VIDEO_PARTNER"
      },
      "loginAccount": {
        "accountId": "PARTNER_ID",
        "accountType": "DISPLAY_VIDEO_PARTNER"
      },
      "productDestinationId": "AUDIENCE_ID"
    }
  ]
}

Display & Video 360 partner access scenario

If you want to send data to a Display & Video 360 advertiser and your credentials are for a Google Account that's a user in the advertiser's parent Display & Video 360 partner account:

Destination
operating_account
account_id The ID of the Display & Video 360 advertiser account
account_type DISPLAY_VIDEO_ADVERTISER
login_account
account_id The ID of the Display & Video 360 partner account
account_type DISPLAY_VIDEO_PARTNER
linked_account Don't set the linked_account field.
product_destination_id The ID of the audience.

Here's an example of a Destination for a partner access scenario to send data to a Display & Video 360 advertiser. In this scenario, the credentials must be for a Google Account that's a user in the Display & Video 360 partner account PARTNER_ID, and Display & Video 360 advertiser account ADVERTISER_ID must be a child of partner account PARTNER_ID.

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "ADVERTISER_ID",
        "accountType": "DISPLAY_VIDEO_ADVERTISER"
      },
      "loginAccount": {
        "accountId": "PARTNER_ID",
        "accountType": "DISPLAY_VIDEO_PARTNER"
      },
      "productDestinationId": "AUDIENCE_ID"
    }
  ]
}

Google Analytics

Note: The operating_account and login_account must be identical when the destination is a Google Analytics account. Otherwise, the request fails with the error OPERATING_ACCOUNT_LOGIN_ACCOUNT_MISMATCH.

Destination
operating_account
account_id The ID of the Google Analytics property
account_type GOOGLE_ANALYTICS_PROPERTY
login_account Either don't set the login_account, or set to the same values as operating_account.
linked_account Don't set the linked_account field.
product_destination_id The measurement ID of the data stream.

Here's an example of a Destination for sending events to Google Analytics:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "PROPERTY_ID",
        "accountType": "GOOGLE_ANALYTICS_PROPERTY"
      },
      "loginAccount": {
        "accountId": "PROPERTY_ID",
        "accountType": "GOOGLE_ANALYTICS_PROPERTY"
      },
      "productDestinationId": "MEASUREMENT_ID"
    }
  ]
}

Data partner scenarios

Here's how to configure a Destination for common scenarios for a data partner that sends data to advertiser accounts with an established product link to the data partner account.

This diagram shows how the Data Manager API uses the credentials and Destination fields to access the advertiser account through a product link.

Data partner access path

Google Ads

Here's a diagram showing an example of a set of Google Ads and data partner accounts. The diagram also shows which Google Account is a user in each Google Ads or data partner account, as well as the product links between accounts.

Data partner and Google Ads accounts and users

Data partner D1

A product link exists between D1 and Google Ads manager account M2.

Google Account 222larabrown@gmail.com is a user in D1.

Data partner D2

A product link exists between D2 and Google Ads client account C1.

Google Account jeffersonloveshiking@gmail.com is a user in D2.

Manager account M1

M1 has two direct child accounts:

  1. Manager account M2
  2. Client account C1
Manager account M2

M2 has two direct child accounts:

  1. Client account C1
  2. Client account C2
Client account C1

C1 has two direct parent manager accounts:

  1. Manager account M1
  2. Manager account M2
Client account C2

Manager account M2 is the only direct parent of C2.

Here's what you can do with this set of accounts:

Act as data partner D1

To act as data partner D1, use credentials for Google Account 222larabrown@gmail.com to send data to manager account M2, client account C1, or client account C2, using a destination with login_account set to data partner account D1 and linked_account set to manager account M2.

As data partner D1, you can't send data to manager account M1 because there isn't a product link between D1 and M1.

Act as data partner D2

To act as data partner D2, use credentials for Google Account jeffersonloveshiking@gmail.com to send data to client account C1, using a destination with login_account set to data partner account D2 and linked_account set to client account C1.

As data partner D2, you can't send data to manager account M1, manager account M2, or client account C2 because there isn't a product link between D2 and any of those accounts or their parent manager accounts.

The key difference between data partners D1 and D2 is how the data partner is linked to Google Ads accounts.

Direct product link scenario

If you want to send data to a Google Ads account and the product link is between the Google Ads account and your data partner account:

Destination
operating_account
account_id The customer ID of the Google Ads account
account_type GOOGLE_ADS
login_account
account_id The customer ID of the data partner account
account_type DATA_PARTNER
linked_account Don't set the linked_account field.
product_destination_id The ID of the audience or conversion action.

Here's an example of a direct product link scenario using accounts from the diagram. In this scenario, data partner D2 sends audience member data to Google Ads client customer C1 using the product link between D2 and C1, and credentials for Google Account jeffersonloveshiking@gmail.com:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "C1_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"
      },
      "loginAccount": {
        "accountId": "D2_CUSTOMER_ID",
        "accountType": "DATA_PARTNER"
      },
      "productDestinationId": "USER_LIST_ID"
    }
  ]
}

Manager product link scenario

If you want to send data to a Google Ads account and the product link is between a parent Google Ads manager account and your data partner account:

Destination
operating_account
account_id The customer ID of the Google Ads client account
account_type GOOGLE_ADS
login_account
account_id The customer ID of the data partner account
account_type DATA_PARTNER
linked_account
account_id The customer ID of the Google Ads manager account
account_type GOOGLE_ADS
product_destination_id The ID of the audience or conversion action.

Here's an example of a manager product link scenario using accounts from the diagram. In this scenario, data partner D1 sends audience member data to Google Ads client customer C2 using the product link between D1 and M2, and credentials for Google Account 222larabrown@gmail.com:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "C2_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"
      },
      "loginAccount": {
        "accountId": "D1_CUSTOMER_ID",
        "accountType": "DATA_PARTNER"
      },
      "linkedAccount": {
        "accountId": "M2_CUSTOMER_ID",
        "accountType": "GOOGLE_ADS"
      },
      "productDestinationId": "USER_LIST_ID"
    }
  ]
}

Display & Video 360

As a data partner, you can send data to a Display & Video 360 account using two approaches:

  1. Use a direct product link between a data partner account and the Display & Video 360 partner or advertiser account.
  2. Send data to a Display & Video 360 advertiser using a product link between a data partner account and the advertiser's parent Display & Video 360 partner account.

If you want to send data to a Display & Video 360 advertiser and the product link is between the Display & Video 360 advertiser account and your data partner account:

Destination
operating_account
account_id The ID of the Display & Video 360 advertiser account
account_type DISPLAY_VIDEO_ADVERTISER
login_account
account_id The customer ID of the data partner account
account_type DATA_PARTNER
linked_account Don't set the linked_account field.
product_destination_id The ID of the audience or conversion action.

Here's an example of a Destination for a direct product link scenario to send data to a Display & Video 360 advertiser:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "ADVERTISER_ID",
        "accountType": "DISPLAY_VIDEO_ADVERTISER"
      },
      "loginAccount": {
        "accountId": "DATA_PARTNER_ID",
        "accountType": "DATA_PARTNER"
      },
      "productDestinationId": "AUDIENCE_ID"
    }
  ]
}

If you want to send data to a Display & Video 360 partner account, you must have a product link between the Display & Video 360 partner account and your data partner account.

Destination
operating_account
account_id The ID of the Display & Video 360 partner account
account_type DISPLAY_VIDEO_PARTNER
login_account
account_id The customer ID of the data partner account
account_type DATA_PARTNER
linked_account Don't set the linked_account field.
product_destination_id The ID of the audience or conversion action.

Here's an example of a Destination for a direct product link scenario to send data to a Display & Video 360 partner:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "DISPLAY_VIDEO_PARTNER_ID",
        "accountType": "DISPLAY_VIDEO_PARTNER"
      },
      "loginAccount": {
        "accountId": "DATA_PARTNER_ID",
        "accountType": "DATA_PARTNER"
      },
      "productDestinationId": "AUDIENCE_ID"
    }
  ]
}

If you want to send data to a Display & Video 360 advertiser and the product link to your data partner account is with a Display & Video 360 partner account where the advertiser account is a child account:

Destination
operating_account
account_id The ID of the Display & Video 360 advertiser account
account_type DISPLAY_VIDEO_ADVERTISER
login_account
account_id The customer ID of the data partner account
account_type DATA_PARTNER
linked_account
account_id The ID of the Display & Video 360 partner account
account_type DISPLAY_VIDEO_PARTNER
product_destination_id The ID of the audience or conversion action.

Here's an example of a Destination for a partner product link scenario to send data to a Display & Video 360 advertiser using a product link between the data partner and the advertiser's parent Display & Video 360 partner:

{
  "destinations": [
    {
      "operatingAccount": {
        "accountId": "DISPLAY_VIDEO_ADVERTISER_ID",
        "accountType": "DISPLAY_VIDEO_ADVERTISER"
      },
      "loginAccount": {
        "accountId": "DATA_PARTNER_ID",
        "accountType": "DATA_PARTNER"
      },
      "linkedAccount": {
        "accountId": "DISPLAY_VIDEO_PARTNER_ID",
        "accountType": "DISPLAY_VIDEO_PARTNER"
      },
      "productDestinationId": "AUDIENCE_ID"
    }
  ]
}

Google Analytics

The Data Manager API doesn't support sending data to a Google Analytics account using a product link. Use the advertiser scenarios for Google Analytics approach instead.

Detailed requirements

This section contains detailed requirements for the account fields of a Destination, tips for how to set the product_destination_id, and how to determine where your credentials have access.

Account fields

A Destination can have up to 3 different accounts:

operating_account

The operating_account is required.

The operating_account indicates which account receives the data in the request. The operating_account can be any of the following:

login_account

The login_account isn't always required, and defaults to the operating_account.

The Data Manager API verifies that:

  1. The Google Account of the credentials is a user in the login_account.

  2. The login_account is one of the following:

    • The same as the operating_account. This is the default if you don't set the login_account.

    • A Google Ads manager or Display & Video 360 partner account that is a parent of the operating_account.

    • A data partner account with a product link to the linked_account.

linked_account

The linked_account indicates which account has a product link to the login_account.

Product destination ID

The product_destination_id of a Destination identifies which object in the operating_account receives the data. For example, this could be an audience ID for Google Ads or Display & Video 360, a conversion action ID for Google Ads, or a measurement ID for a Google Analytics stream.

Here's how to find the ID for each type of product destination.

Google Ads audience

The product destination ID for ingesting audience members is the audience ID.

To get the audience ID from the Google Ads UI:

  1. Go to Audience manager in the Google Ads UI.
  2. Click the audience name to view details.
  3. The audience ID is listed next to List ID.

To get the audience ID from the Google Ads API:

  1. Send a Search or SearchStream request to GoogleAdsService with the following query:

    SELECT
      user_list.id,
      user_list.name
    FROM user_list
    WHERE user_list.name = 'USER_LIST_NAME'
    
  2. Get the audience ID from the id field in the user_list in the response.

    [
      {
        "results": [
          {
            "userList": {
              "resourceName": "customers/CUSTOMER_ID/userLists/USER_LIST_ID",
              "id": "USER_LIST_ID",
              "name": "USER_LIST_NAME"
            }
          }
        ]
      }
    ]
    

Google Ads event

The product destination ID for ingesting events is the conversion action ID.

To get the conversion action ID from the Google Ads UI:

  1. Go to Conversions in the Google Ads UI.
  2. Click the conversion action name to view details.
  3. The conversion action ID is the value for the URL query parameter named ctId.

    https://ads.google.com/aw/conversions/detail?ocid=...&ctId=CONVERSION_ACTION_ID&...
    

To get the conversion action ID from the Google Ads API:

  1. Send a Search or SearchStream request to GoogleAdsService with the following query:

    SELECT
      conversion_action.id,
      conversion_action.name
    FROM conversion_action
    WHERE conversion_action.name = 'CONVERSION_ACTION_NAME'
    
  2. Get the conversion action ID from the id field in the conversion_action in the response.

    [
      {
        "results": [
          {
            "conversionAction": {
              "resourceName": "customers/CUSTOMER_ID/conversionActions/CONVERSION_ACTION_ID",
              "id": "CONVERSION_ACTION_ID",
              "name": "CONVERSION_ACTION_NAME"
            }
          }
        ]
      }
    ]
    

Display & Video 360 audience

The product destination ID for ingesting audience members is the audience ID.

To get the audience ID from the Display & Video 360 UI:

  1. Sign in to the Display & Video 360 UI at https://displayvideo.google.com.
  2. Navigate to the Display & Video 360 partner or advertiser you're using for the operating_account.
  3. Go to Audiences on the left menu, then select All audiences.
  4. Find the audience in the list. The audience ID is the number next to the name in the Name column.

Google Analytics event

The product destination ID for ingesting events is the measurement ID of the data stream.

Determine where credentials have access

The credentials that you use to authorize a Data Manager API request are associated with a specific Google Account.

  • If you use user credentials, requests are authorized as the Google Account of the user who granted permission to act on their behalf when you generated the credentials.
  • If you use service account credentials, requests are authorized as the service account's Google Account.

Here's how to verify that the Google Account for your credentials has access to a Google Ads, Display & Video 360, or Google Analytics account.

Google Ads or data partner

  1. Go to Access and security in the Google Ads UI for the login_account.
  2. Select the Users tab.
  3. If the login_account is a Google Ads manager account, turn off the Show users in full hierarchy toggle to hide users from child accounts.
  4. Verify that the Google Account for your credentials is in the list of accounts shown on the Users tab.

Display & Video 360

  1. Go to User management and email preferences in the Display & Video 360 UI.
  2. Verify that the User management shows that the Google Account for your credentials is a user on the login_account.

Google Analytics

  1. Go to Property access management in the Google Analytics UI.
  2. Confirm that the Google Analytics property specified in the login_account is selected.
  3. Verify that the Google Account for your credentials has the Editor or Administrator role on the property.