{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Google Ads Import Integration V2","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"google-ads-import-integration-v2","__idx":0},"children":["Google Ads Import Integration V2"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google Ads is an online advertising platform that allows businesses to promote their products and services through digital ads across millions of Google partner websites and its services such as Google Search, YouTube, and Maps. This integration allows you to import Google Ads reports and metrics into Treasure Data to tailor-made your customer experiences, make data-driven decisions to optimize your campaigns, and achieve better marketing results"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Treasure Data™"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic understanding of ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://support.google.com/google-ads/answer/2404036?hl=en&sjid=211862480303301723-AP"},"children":["Google Ads performance data"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"requirements-and-limitations","__idx":2},"children":["Requirements and Limitations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The import job could fail if the data is too big. Using paging could fix that problem."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Google might change the default views of its performance data from time to time, thus the below pre-defined metric collection of each report type might not be the same as the corresponding reports found on the Google Ads. However, missing metrics could be added to fulfill the data requirement."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["This article doesn't intend to list all available attributes, segments, metrics, and explanations for them. For more details, please refer to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/google-ads/api/fields/v17/overview_query_builder"},"children":["Google Ads Query Builder"]},", or the Report Editor feature which can be found on the Google Ads UI (Campaigns > Insights and reports > Report Editor)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"import-from-google-ads-via-treasure-console","__idx":3},"children":["Import from Google Ads via Treasure Console"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You must create and configure the data connection on Treasure Console before importing data. As part of the data connection, you provide the OAuth authentication of your Google Ads account to deploy the integration using the following steps."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/screen-shot-2022-03-28-at-15.07.52.3cad2b46ae60f8077320ea9edfd3e1f3e6b38c3658d428682450fec957700f6d.7c52a81f.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open Treasure Console"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub > Catalog"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Search for and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Ads V2"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Authentication"]},"and provide the OAuth of a Google account with access to the target Google Ads account"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["After being redirected back to the Integration Hub, repeat the above steps (this time your provided OAuth will be shown), enter a name for your authentication, and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-source","__idx":4},"children":["Create a Source"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open Treasure Console"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub > Authentications"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Locate your new authentication and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Source"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the first step ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1 - Connection"]},", type a source name in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Transfer Name"]}," field, and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"identify-a-source-table","__idx":5},"children":["Identify a Source Table"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Identify what data to be ingested into Treasure Data using the parameters below, and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This integration supports flexible ways to define your target data:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Choose one of the 4 pre-defined report types, and pick up the desired Attributes, Segments, and Metrics. Or,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Fill in a custom query valid for Google Ads to import necessary data. It is recommended to use this option together with the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/google-ads/api/fields/v17/overview_query_builder"},"children":["Google Ads Query Builder"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/adwordsv2b.c98f784aca54d18a6127fcb31283681502b8c09c677271b52e2939499adb4c4f.7c52a81f.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source Table Parameter"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ads Account"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ID of the target Google Ads account, with or without dashes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ads Manager Account"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ID of the Google Manager account. This is required if the Ads Account is accessible via a manager account."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable Custom Query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["With this option enabled, a custom query can be used to declare the target data source. Refer to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/google-ads/api/fields/v17/overview_query_builder"},"children":["Google Ads Query Builder"]}," for more details. Otherwise, choose one of the pre-defined report types, and pick up the desired Attributes, Segments, and Metrics."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Report Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optional"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Required if the Custom Query option is disabled. Each pre-defined report type will have its collections of Attributes, Segments, and Metrics."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ad Performance (similar to the dashboard found on Campaigns > Campaigns > Ads)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ad Group Performance (similar to the dashboard found on Campaigns > Campaigns > Ad groups)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Campaign Performance (similar to the dashboard found on Campaigns > Campaigns > Campaigns)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Keywords Performance (similar to the dashboard found on Campaigns > Audiences, keywords and content > Search keywords)"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Include Negative Keywords"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable negative keywords to ingest when the report type is Keywords Performance Report"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use predefined metrics"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use predefined metrics of the selected report type, instead of adding additional metrics"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array of string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of additional attributes for the selected report type"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Segments"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array of string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["At least 1 segment must be added for all the predefined report types. Only time segment is supported: Date, Day of week, Week, Month, Quarter, Year. When the Date Range is All Time, no time segment is required. Otherwise, one type of time segment is needed."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Metrics"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array of string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of additional metrics for the selected report type"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Date Range"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optional"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The date range of the target data. Supported values:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Custom Date: define your target range using Start Date and End Date"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Today, Yesterday"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Last 7 days, Last business week"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["This month, Last month"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["All time"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Last 14 days, Last 30 days"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["This week from the previous Sunday to today"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["This week from the previous Monday to today"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Last week from the previous Sunday to Saturday"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Start Date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The start date of the custom date range in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["yyyy-MM-dd"]}," format"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["End Date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The end date of the custom date range in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["yyyy-MM-dd"]}," format"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Incremental mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable to run the job in incremental mode"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Source Table Parameter - Custom Query"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Select Columns"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A comma-separated list of fields to query. It should include necessary attributes, segments, and metrics."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["From Target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The target resource name. It will be used in the FROM clause of the query statement."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Other Conditions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Other conditions for the query. It will be used in the WHERE clause of the query statement."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable Date Range"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable query by date range option. Disabling this option requires that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Other Conditions"]}," starts with the WHERE keyword. Disabling this option also disables Incremental mode, Start Date, and End Date."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"define-data-settings","__idx":6},"children":["Define Data Settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, you can modify advanced data settings. Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}," to move to the next step."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/google-ads-import-integration-v2-2024-08-06-5.9673dac09cfdafcf311c3895320451d2e018d8e5f17d194f5c066d1649402578.7c52a81f.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Retry Limit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Internal maximum retries limit. Default: 5 times."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Initial retry time wait in millis"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Initial retry waiting time in milliseconds. Default: 500ms."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Max retry wait in millis"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum retry waiting time in milliseconds. Default: 300,000ms."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"preview-your-data","__idx":7},"children":["Preview Your Data"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["**4 - Data Preview**"]}," step, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Generate Preview"]}," to see an ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/previewing-your-source-data"},"children":["approximated view"]}," of your data before running the import (optional)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]}," to continue"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/google-ads-import-integration-v2-2024-08-06-3.d1a7264878d399f9a4e744868a69b15ed5ab861a1fd396d9ecef55513fcc8527.7c52a81f.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-placement","__idx":8},"children":["Data Placement"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For data placement, select the target database and table where you want your data placed and indicate how often the import should run."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next."]}," Under Storage, you will create a new or select an existing database and create a new or select an existing table for where you want to place the imported data."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Database"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select an existing"]}," or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create New Database"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, type a database name."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table"]},"> ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select an existing"]}," or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create New Table"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, type a table name."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Choose the method for importing the data."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Append"]}," (default)-Data import results are appended to the table."," ","If the table does not exist, it will be created."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always Replace"]},"-Replaces the entire content of an existing table with the result output of the query. If the table does not exist, a new table is created."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Replace on New Data"]},"-Only replace the entire content of an existing table with the result output when there is new data."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timestamp-based Partition Key"]}," column."," ","If you want to set a different partition key seed than the default key, you can specify the long or timestamp column as the partitioning time. As a default time column, it uses upload_time with the add_time filter."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timezone"]}," for your data storage."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},", you can choose when and how often you want to run this query."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"run-once","__idx":9},"children":["Run once"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Off"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scheduling Timezone"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create & Run Now"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"repeat-regularly","__idx":10},"children":["Repeat Regularly"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["On"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},". The UI provides these four options: ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@hourly"]},", ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@daily"]}," and ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["@monthly"]}," or custom ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["cron"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can also select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delay Transfer"]}," and add a delay of execution time."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scheduling Timezone"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create & Run Now"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After your transfer has run, you can see the results of your transfer in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Databases."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"import-from-google-ads-via-cli-toolbelt","__idx":11},"children":["Import from Google Ads via CLI (Toolbelt)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Prerequisites:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TD Toolbelt: install the latest version of the Treasure CLI tool: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["TD Toolbelt"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Authentication ID: follow the steps above to create an Authentication for this integration on the Treasure Console. Then the ID could be seen at the last portion of its URL on the Authentication screen."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/google-ads-import-integration-v2-2024-08-06-9.fdc162a377e20998a8f41e69c38afef49bbd1ab0b84f6b913fd06fe82b2010f3.7c52a81f.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["General steps:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a YML configuration file, ex: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]},", referencing the created authentication in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_authentication_id"]}," field."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to the below ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/google-ads-import-integration-v2#parameters-reference"},"children":["Parameter Reference"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/google-ads-import-integration-v2#examples"},"children":["Example"]}," for more details"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Preview the input data (optional) using the command:"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:preview load.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Trigger the data import using the command:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:issue load.yml \\\n--database db-name --table table-name\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Schedule the execution using the command:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td connector:create daily_import \\\n\"10 0 * * *\" db-name table-name load.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Refer to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/amazon-redshift-import-integration-using-the-cli"},"children":["this page"]}," for more reference information"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-reference","__idx":12},"children":["Parameters Reference"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default Value"},"children":["Default Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_customer_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Client customer ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["True"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["login_customer_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ads Manager Account ID. This is required if the Ads Account is accessible via a Google Manager account."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Predefined report type. Used when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_custom_query"]}," is false."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ad_performance_report"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["adgroup_performance_report"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["campaign_performance_report"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["keywords_performance_report"]}]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["segments"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of additional segments.   Used when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_custom_query"]}," is false.  When the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date_range"]}," is ALL_TIME, no time segment is required  Otherwise, one type of time segment is needed.  time segment is supported: Date, Day of week, Week, Month, Quarter, Year"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["include_predefined_metrics"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Include all predefined metrics  Used when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_custom_query"]}," is false."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["True"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["metrics"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of additional metrics.  Used when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_custom_query"]}," is false."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of additional attributes.  Used when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_custom_query"]}," is false"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run the job in incremental mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental_duration"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Duration in days for the incremental job.  Ignore end_date and recalculate it by this formula:   end_date = start_date + incremental_duration"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["date_range"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The date range of the target data. Refer to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/google-ads-import-integration-v2#h2__1553143459"},"children":["here"]}," for supported values"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["start_date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Start date, used with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date_range"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["custom_date"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["end_date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["End date, used with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date_range"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["custom_date"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["include_negative_keywords"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Filter the records by negative keywords, only used with keywords_performance_report"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["enable_custom_query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable the use of custom query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["True"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["select_columns"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of fields to query, separated by comma"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["from_target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Report target name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["other_conditions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The other condition of the query"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["enable_date_range"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable data range query and incremental mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["True"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["td_authentication_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ID of an Authentication created on the Treasure Console. Enable query by date range option. Disable this option will require ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Other Conditions"]}," to start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WHERE"]}," keyword.  Disable this option also disable Incremental mode, Start Date, and End Date also"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["True"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["refresh_token"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The authentication info is required, and it is more convenient to create it on the UI and then refer to its ID using the above parameter. Alternatively, you can create a Google API project to provide the credential information required for these four parameters."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["False"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"examples","__idx":13},"children":["Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"disable-custom-query","__idx":14},"children":["Disable custom query"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: google_adwords_v2\n  td_authentication_id: 330392\n  enable_custom_query: false\n  client_customer_id: xx-xxxx-xxxx\n  target: AD_PERFORMANCE_REPORT\n  date_range: \"CUSTOM_DATE\"\n  include_predefined_metrics: false\n  incremental: true\n  start_date: 2020-03-01\n  end_date: 2020-03-02\n  segments: [\"segments.date\"]\n  metrics: [\"metrics.absolute_top_impression_percentage\"]\nout:\n  mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"enable-custom-query","__idx":15},"children":["Enable custom query"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: google_adwords_v2\n  td_authentication_id: 330392\n  enable_custom_query: true\n  client_customer_id: xx-xxxx-xxxx\n  date_range: \"CUSTOM_DATE\"\n  enable_date_range: true\n  incremental: true\n  start_date: 2020-03-01\n  end_date: 2020-03-02\n  select_columns: ad_group_criterion.criterion_id, ad_group.id, ad_group.name, segments.date\n  from_target: keyword_view\n  other_conditions: \"AND ad_group_criterion.type = 'KEYWORD'\"\nout:\n  mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"use-with-manager-ads-account","__idx":16},"children":["Use with Manager Ads Account"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: google_adwords_v2\n  td_authentication_id: 330392\n  enable_custom_query: true\n  client_customer_id: xx-xxxx-xxxx\n  login_customer_id: xx-xxxx-xxxx\n  date_range: \"CUSTOM_DATE\"\n  incremental: true\n  start_date: 2020-03-01\n  end_date: 2020-03-02\n  select_columns: ad_group_criterion.criterion_id, ad_group.id, ad_group.name, segments.date\n  from_target: keyword_view\n  other_conditions: \"AND ad_group_criterion.type = 'KEYWORD'\"\nout:\n  mode: append\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"import-from-google-ads-v2-via-workflow","__idx":17},"children":["Import from Google Ads V2 via Workflow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can import data from Google Ads by using the Treasure Workflow. Refer ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/using-td-workflow-with-td-integrations"},"children":["here"]}," for more detailed information."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"how-to-convert-google-ads-query-language-to-a-custom-query-in-the-connector","__idx":18},"children":["How to convert Google Ads Query Language to a custom query in the connector"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Query language reference: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developers.google.com/google-ads/api/docs/query/overview?hl=en"},"children":["https://developers.google.com/google-ads/api/docs/query/overview?hl=en"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT\n  campaign.id,\n  campaign.name,\n  campaign.status,\n  metrics.impressions,\n  segments.date,\nFROM campaign\nWHERE segments.date during LAST_30_DAYS\n  AND campaign.status = 'PAUSED'\n  AND metrics.impressions > 1000\nORDER BY campaign.id\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:  \n  type: google_adwords_v2  \n  enable_custom_query: true\n  client_id: xxx\n  client_secret: xxx\n  refresh_token: xxx\n  client_customer_id: xx-xxxx-xxxx\n  date_range: \"LAST_30_DAYS\"\n  developer_token: xxx  \n  select_columns: campaign.id, campaign.name, campaign.status, metrics.impressions, segments.date  \n  from_target: campaign  \n  other_conditions: \"AND campaign.status = 'PAUSED' AND metrics.impressions > 1000\"\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:  \n  type: google_adwords_v2  \n  enable_custom_query: true\n  client_id: xxx\n  client_secret: xxx\n  refresh_token: xxx\n  client_customer_id: xx-xxxx-xxxx\n  login_customer_id: xx-xxxx-xxxx\n  date_range: \"LAST_30_DAYS\"\n  developer_token: xxx  \n  select_columns: campaign.id, campaign.name, campaign.status, metrics.impressions, segments.date  \n  from_target: campaign  \n  other_conditions: \"AND campaign.status = 'PAUSED' AND metrics.impressions > 1000\"\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note: The query should have time and it should present the where condition, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["other_conditions"]},"  should start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AND"]}," as in the example."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"predefined-metrics","__idx":19},"children":["Predefined Metrics"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Report Type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Predefined Metrics"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ad Performance AdGroup Performance Campaign Performance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Clicks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Impressions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ctr"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AverageCpc"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Cost"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Conversions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ViewThroughConversions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["CostPerConversion"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ConversionRate"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ConversionFromInteractionsRate"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Keywords Performance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Clicks"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Impressions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ctr"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AverageCpc"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Cost"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Conversions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ViewThroughConversions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["CostPerConversion"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ConversionRate"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AbsoluteTopImpressionPercentage"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["TopImpressionPercentage"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"available-date-ranges","__idx":20},"children":["Available Date Ranges"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Date Range"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TODAY"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Today only."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["YESTERDAY"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yesterday only."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["LAST_7_DAYS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The last 7 days not including today."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["LAST_WEEK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The seven-day period starting with previous Monday."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["LAST_BUSINESS_WEEK"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The 5-day business week, Monday through Friday, of the previous business week."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["THIS_MONTH"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All days in the current month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["LAST_MONTH"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["All days in the previous month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ALL_TIME"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The entire available time range."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CUSTOM_DATE"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A custom date range. Need ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start_date"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["end_date"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["yyyy-MM-dd"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["LAST_14_DAYS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The last 14 days not including today."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["LAST_30_DAYS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The last 30 days not including today."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["THIS_WEEK_SUN_TODAY"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The period between the previous Sunday and the current day."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["THIS_WEEK_MON_TODAY"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The period between the previous Monday and the current day."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["LAST_WEEK_SUN_SAT"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The seven-day period starting with the previous Sunday."]}]}]}]}]}]},"headings":[{"value":"Google Ads Import Integration V2","id":"google-ads-import-integration-v2","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Requirements and Limitations","id":"requirements-and-limitations","depth":2},{"value":"Import from Google Ads via Treasure Console","id":"import-from-google-ads-via-treasure-console","depth":2},{"value":"Create a Source","id":"create-a-source","depth":3},{"value":"Identify a Source Table","id":"identify-a-source-table","depth":3},{"value":"Define Data Settings","id":"define-data-settings","depth":3},{"value":"Preview Your Data","id":"preview-your-data","depth":3},{"value":"Data Placement","id":"data-placement","depth":3},{"value":"Run once","id":"run-once","depth":4},{"value":"Repeat Regularly","id":"repeat-regularly","depth":4},{"value":"Import from Google Ads via CLI (Toolbelt)","id":"import-from-google-ads-via-cli-toolbelt","depth":2},{"value":"Parameters Reference","id":"parameters-reference","depth":3},{"value":"Examples","id":"examples","depth":3},{"value":"Disable custom query","id":"disable-custom-query","depth":4},{"value":"Enable custom query","id":"enable-custom-query","depth":4},{"value":"Use with Manager Ads Account","id":"use-with-manager-ads-account","depth":4},{"value":"Import from Google Ads V2 via Workflow","id":"import-from-google-ads-v2-via-workflow","depth":3},{"value":"How to convert Google Ads Query Language to a custom query in the connector","id":"how-to-convert-google-ads-query-language-to-a-custom-query-in-the-connector","depth":3},{"value":"Predefined Metrics","id":"predefined-metrics","depth":3},{"value":"Available Date Ranges","id":"available-date-ranges","depth":3}],"frontmatter":{"seo":{"title":"Google Ads Import Integration V2"}},"lastModified":"2026-06-01T09:09:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/google-ads-import-integration-v2","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}