Skip to content
Last updated

Google AD Manager Via Data Transfer Reports Import Integration

You can import Google Doubleclick for Publisher (DFP) data objects into Treasure Data.

Prerequisites

  • Basic knowledge of Treasure Data
  • Basic knowledge of Google DFP
  • Authorized Treasure Data Service Account access to your Google DFP Account​

Grant Access for Treasure Data

Treasure Data’s DFP input connector requires permissions to read data from your Google DFP account. From your Google DFP console, click “Admin" table, select “Global settings" and then “All network settings, you can see a button on the right panel at the “Service account user" section to grant access to a service account user.

After you grant access to our service account email (google-dfp@affable-beach-161802.iam.gserviceaccount.com), complete the following steps to import your data.

Use TD Console

Go to Integrations Hub > Catalog and search and select Google Ad Manager via Data Transfer Reports for Import.

The dialog opens. Enter your DFP network information that you can find in your Google DFP console by clicking “Admin" > “Global settings" > “All network settings" > “Network code".

Use Command Line / Workflow

Create Configuration File

Prepare configuration file (for eg: load.yml) with your Google DFP account access information, as shown in the following example:

in:
  type: google_dfp
  target: order
  network_code: 1234567
  auth_method: SERVICE_ACCOUNT
  start_date: 2017-01-02T12:00:00
  end_date: 2017-11-10T10:00:00
out:
  mode: replace

This example dumps Google DFP Order data object:

  • target: Google DFP data object you want to import.
    • See the Appendix for the list of available target.
  • network_code: Google DFP network code
  • auth_method: Support authorization via a Google service account (required, supported value: SERVICE_ACCOUNT)
  • start_date: import data from this date (optional), format is: yyyy-MM-dd'T'hh:mm:ss
  • end_date: import data from this date (optional), format is: yyyy-MM-dd'T'hh:mm:ss

The start_date and end_date is available (and optional) for Order target. For the list of all options available for each target, see the Appendix

For more details on available out modes, see the Appendix

append (default)

This is the default mode and records are appended to the target table.

in:
...
out:
  mode: append

replace (In td 0.11.10 and later)

This mode replaces data in the target table. Any manual schema changes made to the target table remains intact with this mode.

in:
...
out:
  mode: replace

Available Targets

TargetDescription
companyCompany data object
creativeCreative data object
inventory_adunitInventory AdUnit data object
line_itemLine Item data object
orderOrder data object
placementPlacement data object
reportReporting using saved report query

Available Target Options

Target  Optionsstart_dateend_datereport_querylast_fetched_datetime
companyx
creativex
inventory_adunitx
line_itemxxx
orderxxx
placementx
reportx
  • start_date (optional): import data from this date (optional), format is: yyyy-MM-dd'T'hh:mm:ss
  • end_date (optional): import data from this date (optional), format is: yyyy-MM-dd'T'hh:mm:ss
  • report_query (required): the query name (or id) of the saved report query in your Google DFP console
  • last_fetched_datetime (optional): only import data that has last modified time after (exclusive) this date time. This value is in epoch millis format, e.g. ‘1509511116000’ (08 Nov 2017 15:33:20)

Report Target

The report target executes the query specified in report_query to get the report and import the data into our database. Hence, the query must be accessible by our system in advance. You can grant access to our Google DFP service account email (google-dfp@affable-beach-161802.iam.gserviceaccount.com) in the “User able to edit" field.

Pay attention to the date range you are using in the report query. From here, you can find the list of dynamic date ranges supported by Google API.