# Google Ads to BigQuery

# Introduction

The module integrates with the Google Ads API in order to download data and save it in Google BigQuery. How is the module different from Google Ads Data Transfer offered by Google BigQuery? Data can be downloaded from the present day. The Google Ads Data Transfer module available in Google BigQuery does not download today data.

# An example of operation

  1. You are configuring the Google Ads module
  2. You are using the module to automatically combine costs with Google Analytics data
  3. You run reports that show the cost attributed to products, even if they come from brand campaigns
  4. You optimize your campaigns based on the cost and sales effectiveness of your products

# Data schema

After running the module, 5 new tables will appear in the dataset:

image alt text

Expand to see the data schema for the table campaigns
fullname mode type description
ExternalCustomerId NULLABLE STRING The Customer ID.
AccountDescriptiveName NULLABLE STRING The Customer Name.
BaseCampaignId NULLABLE STRING The ID of base campaign of trial campaigns. For regular campaigns, this is equal to CampaignId.
CampaignGroupId NULLABLE STRING The ID of campaign group.
CampaignId NULLABLE STRING The ID of the Campaign.
CampaignName NULLABLE STRING The name of the Campaign.
ActiveViewCpm NULLABLE FLOAT Average cost of viewable impressions (ActiveViewImpressions). Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
ActiveViewCtr NULLABLE FLOAT How often people clicked your ad after it became viewable. To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
ActiveViewImpressions NULLABLE INTEGER How often your ad has become viewable on a Display Network site.
ActiveViewMeasurability NULLABLE FLOAT The ratio of impressions that could be measured by Active View over the number of served impressions. To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
ActiveViewMeasurableCost NULLABLE FLOAT The cost of the impressions you received that were measurable by Active View. Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
ActiveViewMeasurableImpressions NULLABLE INTEGER The number of times your ads are appearing on placements in positions where they can be seen.
ActiveViewViewability NULLABLE FLOAT The percentage of time when your ad appeared on an Active View enabled site (measurable impressions) and was viewable (viewable impressions). To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
AdNetworkType1 NULLABLE STRING First level network type.
AdNetworkType2 NULLABLE STRING Second level network type (includes search partners).
AverageCost NULLABLE FLOAT The average amount you pay per interaction. This amount is the total cost of your ads divided by the total number of interactions. Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
AverageCpc NULLABLE FLOAT The total cost of all clicks divided by the total number of clicks received. Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
AverageCpm NULLABLE FLOAT Average Cost-per-thousand impressions (CPM). Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
AveragePosition NULLABLE STRING Your ad's position relative to those of other advertisers. To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
ClickType NULLABLE STRING Indicates the click type for metric fields such as Impressions. Since ads that serve can be attributed to multiple click types, metric fields may be double-counted and thus totals may not be accurate, especially for Display network campaigns.
Clicks NULLABLE INTEGER The number of clicks.
ConversionRate NULLABLE FLOAT The number of conversions divided by total clicks that can be tracked to conversions. Percentage returned as "x.xx%". To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
ConversionValue NULLABLE FLOAT The sum of conversion values for all conversions. This field is formatted with dot (".") for decimal separator, precision of two decimal positions and no thousands separator (e.g. 1000000.00). To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
Conversions NULLABLE FLOAT The number of conversions for all conversion actions that you have opted into optimization. This field is formatted with dot (".") for decimal separator, precision of two decimal positions and no thousands separator (e.g. 1000000.00). To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
AllConversions NULLABLE FLOAT Best estimate of the total number of conversions that Google Ads drives. Includes website, cross-device, and phone call conversions. This field is formatted with dot (".") for decimal separator, precision of two decimal positions and no thousands separator (e.g. 1000000.00). To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
Cost NULLABLE FLOAT The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period. Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
CostPerConversion NULLABLE FLOAT The Cost attributable to conversion-tracked clicks divided by the number of conversions Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
Ctr NULLABLE FLOAT The number of clicks your ad receives (Clicks) divided by the number of times your ad is shown (Impressions). Percentage returned as "x.xx%". To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
Date NULLABLE DATE The date formatted as yyyy-MM-dd.
DayOfWeek NULLABLE STRING The name of the day of the week, e.g., "Monday".
Device NULLABLE STRING Device type where the impression was shown.

* Note: CONNECTED_TV will be available on January 8, 2019. See our blog for more details.
Impressions NULLABLE INTEGER Count of how often your ad has appeared on a search results page or website on the Google Network.
InteractionRate NULLABLE FLOAT How often people interact with your ad after it is shown to them. This is the number of interactions divided by the number of times your ad is shown. Percentage returned as "x.xx%". To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
InteractionTypes NULLABLE STRING The types of interactions that are reflected in the Interactions, InteractionRate, and AverageCost columns.
Interactions NULLABLE INTEGER The number of interactions. An interaction is the main user action associated with an ad format--clicks for text and shopping ads, views for video ads, and so on.
Month NULLABLE DATE The first day of the month, formatted as yyyy-MM-dd.
MonthOfYear NULLABLE STRING The name of the month of the year, e.g., "December".
Quarter NULLABLE DATE The first day of the quarter, formatted as yyyy-MM-dd. Uses the calendar year for quarters, e.g., the second quarter of 2014 starts on 2014-04-01.
Slot NULLABLE STRING The position of the Ad.
ValuePerConversion NULLABLE FLOAT The total value of your conversions divided by the total number of conversions. This field is formatted with dot (".") for decimal separator, precision of two decimal positions and no thousands separator (e.g. 1000000.00). To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
Week NULLABLE DATE The date for the Monday of the week, formatted as yyyy-MM-dd.
Year NULLABLE INTEGER The year, formatted as yyyy.
CampaignStatus NULLABLE STRING The status of the Campaign.
Currency NULLABLE STRING Account currency
Expand to see the data schema for the table click_stats
fullname mode type description
ExternalCustomerId NULLABLE STRING The Customer ID.
AccountDescriptiveName NULLABLE STRING The Customer Name.
CampaignId NULLABLE STRING The ID of the Campaign.
CampaignName NULLABLE STRING The name of the Campaign.
AdGroupId NULLABLE STRING The ID of the AdGroup.
AdGroupName NULLABLE STRING The name of the AdGroup.
CreativeId NULLABLE STRING ID of the main object of this row.
CriteriaId NULLABLE STRING The Criterion ID.
GclId NULLABLE STRING The Google Click ID.
UserListId NULLABLE STRING The ID of the UserList (audience).
AdNetworkType1 NULLABLE STRING First level network type.
AdNetworkType2 NULLABLE STRING Second level network type (includes search partners).
Clicks NULLABLE INTEGER The number of clicks.
CriteriaParameters NULLABLE STRING Descriptive string for the Criterion. For more information on the format of criteria types in reports, see the Criteria prefixes section of the reporting guide.
KeywordMatchType NULLABLE STRING The match type for the Keyword.
Page NULLABLE INTEGER Page number in search results where the ad was shown.
Slot NULLABLE STRING The position of the Ad.
Device NULLABLE STRING Device type where the impression was shown.
Currency NULLABLE STRING Account currency
Expand to see the data schema for the table criteria_basic_stats
fullname mode type description
ExternalCustomerId NULLABLE STRING The Customer ID.
AccountDescriptiveName NULLABLE STRING The Customer Name.
CampaignId NULLABLE STRING The ID of the Campaign.
CampaignName NULLABLE STRING The name of the Campaign.
AdGroupId NULLABLE STRING The ID of the AdGroup.
AdGroupName NULLABLE STRING The name of the AdGroup.
Id NULLABLE STRING ID of the main object of this row.
Criteria NULLABLE STRING Descriptive string for the Criterion. For more information on the format of criteria types in reports, see the Criteria prefixes section of the reporting guide.
ActiveViewImpressions NULLABLE INTEGER How often your ad has become viewable on a Display Network site.
ActiveViewMeasurability NULLABLE FLOAT The ratio of impressions that could be measured by Active View over the number of served impressions. To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
ActiveViewMeasurableCost NULLABLE FLOAT The cost of the impressions you received that were measurable by Active View. Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
ActiveViewMeasurableImpressions NULLABLE INTEGER The number of times your ads are appearing on placements in positions where they can be seen.
ActiveViewViewability NULLABLE FLOAT The percentage of time when your ad appeared on an Active View enabled site (measurable impressions) and was viewable (viewable impressions). To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
AdNetworkType1 NULLABLE STRING First level network type.
AdNetworkType2 NULLABLE STRING Second level network type (includes search partners).
AveragePosition NULLABLE STRING Your ad's position relative to those of other advertisers. To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
Clicks NULLABLE INTEGER The number of clicks.
ConversionValue NULLABLE FLOAT The sum of conversion values for all conversions. This field is formatted with dot (".") for decimal separator, precision of two decimal positions and no thousands separator (e.g. 1000000.00). To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
Conversions NULLABLE FLOAT The number of conversions for all conversion actions that you have opted into optimization. This field is formatted with dot (".") for decimal separator, precision of two decimal positions and no thousands separator (e.g. 1000000.00). To prevent calculation accuracy issues, fields whose data type is Double can be used only with the following operators in predicates: LESS_THAN or GREATER_THAN. This is also true for AWQL: Only the operators < and > are allowed in the WHERE clause.
Cost NULLABLE FLOAT The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period. Values can be one of: a) a money amount in micros, b) "auto: x" or "auto" if this field is a bid and AdWords is automatically setting the bid via the chosen bidding strategy, or c) "--" if this field is a bid and no bid applies to the row.
CrossDeviceConversions STRING
Date NULLABLE DATE The date formatted as yyyy-MM-dd.
Device NULLABLE STRING Device type where the impression was shown.

* Note: CONNECTED_TV will be available on January 8, 2019. See our blog for more details.
Impressions NULLABLE INTEGER Count of how often your ad has appeared on a search results page or website on the Google Network.
InteractionTypes NULLABLE STRING The types of interactions that are reflected in the Interactions, InteractionRate, and AverageCost columns.
Interactions NULLABLE INTEGER The number of interactions. An interaction is the main user action associated with an ad format--clicks for text and shopping ads, views for video ads, and so on.
ViewThroughConversions NULLABLE INTEGER The total number of view-through conversions. These happen when a customer sees a Display network ad, then later completes a conversion on your site without interacting with (e.g. clicking on) another ad. This field is formatted using US locale, i.e., using comma "," for thousands and dot "." for decimals.
Currency NULLABLE STRING Account currency
Expand to see the data schema for the table gads_labels
fullname mode type description
Id NULLABLE STRING Label ID.
Name NULLABLE STRING Label name.
CustomerId NULLABLE STRING The Customer ID.
CampaignId NULLABLE STRING The ID of the Campaign.
CampaignName NULLABLE STRING The name of the Campaign.
Rozwiń, aby zobaczyć szczegóły tabeli shopping
fullname mode type description
ExternalCustomerId NULLABLE STRING The Customer ID.
AccountDescriptiveName NULLABLE STRING The Customer Name.
CampaignId NULLABLE STRING The ID of the Campaign.
CampaignName NULLABLE STRING The name of the Campaign.
AdGroupId NULLABLE STRING The ID of the AdGroup.
AdGroupName NULLABLE STRING The name of the AdGroup.
AdNetworkType NULLABLE STRING First level network type.
ClickType NULLABLE STRING Indicates the click type for metric fields such as Impressions. Since ads that serve can be attributed to multiple click types, metric fields may be double-counted and thus totals may not be accurate, especially for Display network campaigns.
ConversionAction NULLABLE STRING Resource name of the conversion action.
ConversionActionCategory NULLABLE STRING Conversion action category.
ConversionActionName NULLABLE STRING Conversion action name.
Date NULLABLE DATE Date to which metrics apply. yyyy-MM-dd format, e.g., 2018-04-17.
DayOfWeek NULLABLE STRING Day of the week, e.g., MONDAY.
Device NULLABLE STRING Device to which metrics apply.
ExternalConversionSource NULLABLE STRING External conversion source.
Month NULLABLE STRING Month as represented by the date of the first day of a month. Formatted as yyyy-MM-dd.
ProductAggregatorId NULLABLE STRING Aggregator ID of the product.
ProductBiddingCategoryLevel1 NULLABLE STRING Bidding category (level 1) of the product.
ProductBiddingCategoryLevel2 NULLABLE STRING Bidding category (level 2) of the product.
ProductBiddingCategoryLevel3 NULLABLE STRING Bidding category (level 3) of the product.
ProductBiddingCategoryLevel4 NULLABLE STRING Bidding category (level 4) of the product.
ProductBiddingCategoryLevel5 NULLABLE STRING Bidding category (level 5) of the product.
ProductBrand NULLABLE STRING Brand of the product.
ProductChannel NULLABLE STRING Channel of the product.
ProductChannelExclusivity NULLABLE STRING Channel exclusivity of the product.
ProductCondition NULLABLE STRING Condition of the product.
ProductCountry NULLABLE STRING Resource name of the geo target constant for the country of sale of the product.
ProductCustomAttribute0 NULLABLE STRING Custom attribute 0 of the product.
ProductCustomAttribute1 NULLABLE STRING Custom attribute 1 of the product.
ProductCustomAttribute2 NULLABLE STRING Custom attribute 2 of the product.
ProductCustomAttribute3 NULLABLE STRING Custom attribute 3 of the product.
ProductCustomAttribute4 NULLABLE STRING Custom attribute 4 of the product.
ProductItemId NULLABLE STRING Item ID of the product.
ProductLanguage NULLABLE STRING Resource name of the language constant for the language of the product.
ProductMerchantId NULLABLE STRING Merchant ID of the product.
ProductStoreId NULLABLE STRING Store ID of the product.
ProductTitle NULLABLE STRING Title of the product.
ProductTypeL1 NULLABLE STRING Type (level 1) of the product.
ProductTypeL2 NULLABLE STRING Type (level 2) of the product.
ProductTypeL3 NULLABLE STRING Type (level 3) of the product.
ProductTypeL4 NULLABLE STRING Type (level 4) of the product.
ProductTypeL5 NULLABLE STRING Type (level 5) of the product.
Quarter NULLABLE DATE Quarter as represented by the date of the first day of a quarter. Uses the calendar year for quarters, e.g., the second quarter of 2018 starts on 2018-04-01. Formatted as yyyy-MM-dd.
Week NULLABLE DATE Week as defined as Monday through Sunday, and represented by the date of Monday. Formatted as yyyy-MM-dd.
Year NULLABLE STRING Year, formatted as yyyy.
AllConversions NULLABLE FLOAT The total number of conversions. This includes all conversions regardless of the value of include_in_conversions_metric.
AllConversionsFromInteractionsRate NULLABLE FLOAT All conversions from interactions (as oppose to view through conversions) divided by the number of ad interactions.
AllConversionsValue NULLABLE FLOAT The value of all conversions.
AverageCpc NULLABLE FLOAT The total cost of all clicks divided by the total number of clicks received.
Clicks NULLABLE INTEGER The number of clicks.
Conversions NULLABLE FLOAT The number of conversions. This only includes conversion actions which include_in_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.
ConversionsFromInteractionsRate NULLABLE FLOAT Conversions from interactions divided by the number of ad interactions (such as clicks for text ads or views for video ads). This only includes conversion actions which include_in_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.
ConversionsValue NULLABLE FLOAT The value of conversions. This only includes conversion actions which include_in_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.
CostMicros NULLABLE INTEGER The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period.
CostPerAllConversions NULLABLE FLOAT Field description The cost of ad interactions divided by all conversions.
CostPerConversion NULLABLE FLOAT The cost of ad interactions divided by conversions. This only includes conversion actions which include_in_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.
CrossDeviceConversions NULLABLE FLOAT Conversions from when a customer clicks on a Google Ads ad on one device, then converts on a different device or browser. Cross-device conversions are already included in all_conversions.
Ctr NULLABLE FLOAT The number of clicks your ad receives (Clicks) divided by the number of times your ad is shown (Impressions).
Impressions NULLABLE INTEGER Count of how often your ad has appeared on a search results page or website on the Google Network.
SearchAbsoluteTopImpressionShare NULLABLE FLOAT The percentage of the customer's Shopping or Search ad impressions that are shown in the most prominent Shopping position. See https://support.google.com/google-ads/answer/7501826 for details. Any value below 0.1 is reported as 0.0999.
SearchClickShare NULLABLE FLOAT The number of clicks you've received on the Search Network divided by the estimated number of clicks you were eligible to receive. Note: Search click share is reported in the range of 0.1 to 1. Any value below 0.1 is reported as 0.0999.
SearchImpressionShare NULLABLE FLOAT The impressions you've received on the Search Network divided by the estimated number of impressions you were eligible to receive. Note: Search impression share is reported in the range of 0.1 to 1. Any value below 0.1 is reported as 0.0999.
ValuePerAllConversions NULLABLE FLOAT The value of all conversions divided by the number of all conversions.
ValuePerConversion NULLABLE FLOAT The value of conversions divided by the number of conversions. This only includes conversion actions which include_in_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.
Currency NULLABLE STRING Currency

# Configuration

# Before you start

Access to your Google Ads advertising account

NOTE to use this module, you must have access to a Google Ads advertising account.

# Start creating the module

From the menu on the left, select the "Collect" tab, then click the Add new Data Coleect button.

image alt text

Select Google Ads from the list of available modules

image alt text

# Initial settings

In the first step, we only have one field to fill.

Collect name- the name of our module. It will be visible under this name elsewhere on the platform.

image alt text

# Authorization with Google Ads

In the next step, we need to grant WitCloud access to BigQuery and our Google Ads service. It is necessary for WitCloud to be able to download data and settings for the service.

To do this, press the Sign in with Google button

image alt text

Then, in a new window, select an email from the list that has access to the Google Analytics service that we want to set up in WitCloud. After selecting, a window will appear with the accesses that we have to grant. Confirm your choice by clicking the "allow" button.

After proper authorization, select our email from the list, and then the Google Ads account whose data we want to export to BigQuery.

The WitCloud module of Google Ads allows you to retrieve data from the Google Ads system by extracting data from the API that does not require any further configuration. The data is displayed in the WitCloud dataset according to a set schedule. It is possible to obtain historical and current data (from today). Up to 5 accounts can be selected.

image alt text

In the next step, select the time period for which the data should be downloaded.

image alt text

Ready! After pressing the Finish button, the module configuration will be saved.

# Setting the module in the schedule

Your module is now created in WitCloud 📊. The final step is to determine the time range for which you need to retrieve historical data. The schedule for retrieving current data will be created automatically.

Enter the appropriate range and click the Finish button.

Last updated: 2023-07-05T14:12:16.000Z