Overview: Query Builder for Google Ads

With the Query Builder for Google Ads, you can create Custom Google Ads Metrics using a combination of Metrics, Dimensions and Filters. Some popular use cases for the Query Builder for Google Ads include creating Campaign- and Ad Group-specific Metrics, and accessing specific Performance Reports from your Google Ads Account. 

IN THIS ARTICLE

How to access the Query Builder for Google Ads

Navigate to  Data Manager > Query Builder to access the Query Builder for Google Ads. Click the green + Create Custom Metric button and select your connected Google Ads Account from the Data Source drop-down list.

    Query Builder is available in Plus and Business Accounts. Agency Basic Accounts have access to Query Builder in the Agency Account only.  Request a trial of Query Builder by following these steps  

How to use the Query Builder for Google Ads

A
  Custom Query Name:  Enter a name for your Custom Metric. This Custom Metric name will be available in the Designer after saving. 
B
  Report: Select a Report from your Google Ads Data Source, such as "Account Performance Report," "Campaign Performance Report," or "Ad Performance Report." This selection determines where the data is being synced from the Google Ads Account and what data is included in the returned Custom Metric value.
C
  Metric: Select a Metric from your connected Google Ads Data Source, such as "Impressions," "Avg. CPC" or "Conv. Rate."  
D
  Dimension (Optional): The Dimension parameter re-categorizes the returned Metric value based on common criteria. In general, the Report selection determines the Dimension options. For example, if you select Campaign Performance Report as the Report, you can select Campaign as a Dimension. If you select Ad Performance Report as the Report, you can select Ad as the Dimension. 
Pro Tip: Add the word "by" in between the Metric and Dimension in order to determine an appropriate Custom Metric Name. From the Metric and Dimension examples outlined above, we could create the Custom Metrics "Reach by Campaign," "Clicks by Region," or "Impressions by Device Platform."
E
  Date Range: Select up to 8 Date Ranges that will be available for the Custom Metric. The Date Ranges selected are the only periods of time that data is synced for this Custom Metric. 
F
  Compare With(Optional) : Select a comparison period to measure each Date Range against, like "Previous Period" or "Same Period Last Year." Data for the comparison period will be synced for each Date Range that is selected. 
This data can be used on a Line Chart or Bar Chart to show past performance. It is also used to calculate the percentage growth or loss of the current Date Range performance vs the comparison Date Range performance. If no Compare With parameter is selected, comparison percentages cannot be displayed for the Custom Metric. 
G
  Filter by(Optional): Filters restrict the data that gets included in the Custom Metric. All data that is returned is tested against the Filter(s). Multiple Filters can be combined using AND boolean logic. 
If the data synced from the Metric and Dimension fields meet the Filter specifications, the data is retained and included in the Custom Metric value. If the data synced from the Metric and Dimension fields don't meet the Filter specifications, the data is excluded from the Custom Metric value.
H
  Data Aggregation: The Data Aggregation field is required when a Dimension is selected for the Custom Metric. The Data Aggregation selection determines how the system will handle duplicate results that are returned from the Google Ads Account. . 
For example, if you create a Custom Metric called "Impressions by Campaign," the same Campaign will have multiple results synced Gooogle Ads Account. In that case, you would want to add together all individual Campaign entries of the same Campaign to produce aggregate values. So, you would select SUM as the Data Aggregation
If you create a Custom Metric to track "Avg. CPC by Campaign," you would want the average of all individual Campaign entries of the same Campaign. In this case, you would select AVG as the Data Aggregation
I
  Data Preview: After clicking Run query, a Data Preview of the Custom Metric will be displayed. Daily Metric values are displayed in this section, along with the total Metric values for the Date Range in bold at the bottom. You can view the Data Preview for different Date Ranges by clicking on the tabs at the top of the Data Preview. 
Pro Tip : If you don't know which Filters to put in place for your use case, use the Dimension + Data Preview to troubleshoot and get more insight into the data that is returned from your Google Ads Account for each field. Learn more here.

How to create a Custom Google Ads Metric [Example]

In this example, we'll create a Custom Metric to report on "Click through Rate (CTR)" tracked in the Google Ads Account, split up based on the Campaign. We only want to view this data for Campaigns that we're actively working on, so "Cost" is above $0. 

1
 Navigate to Data Manager > Query Builder   
2
 Click the green + New query button
3
 Select the appropriate Google Ads Data Source
4
 In order to accurately explain what this Custom Metric is reporting on, we'll name the Custom Metric "CTR by Campaign" 
5
 Since we want to view this on the Campaign level, we'll select Campaign Performance Report as the Report
6
 For the Metric, we'll select CTR
7
 We want to split up all CTRs based on the Device where the action was performed, so we'll select Campaign as the Dimension.  
8
 Next, we'll select the Date Range options for our Custom Metric. We will choose  Last Month, Month to Date, Week to Date, and Quarter to Date as Date Range selections. 
9
 We'll choose Previous Period for the Compare With field. 
10
 We want to restrict the Custom Metric to only retain data for Campaigns we're spending money on, so we'll add a Filter to the Custom Metric. 
First, click on the  Advanced Options hyperlink to open the Filter section of the Query Builder. Click on the  Field dropdown and select Cost. Next, click on the  Operator dropdown, and select Greater than. Lastly, in the Value textbox enter 0.  
11
 Daily CTRs for each Campaign will be returned for this Custom Metric. When multiple results are returned for the same Campaign (i.e., Campaign 1 CTR on May 1 = 5.5, Campaign 1 CTR on May 2 = 6.5, etc.), we need to set a rule for how this is handled. In our case, we want to average the returned values to produce an Avg CTR value for each Campaign. 
So, we'll select AVG as the Data Aggregation
12
 Click Run query to generate a Data Preview of the Custom Metric. 
13
 Once we confirm that these are the results we're looking for, we'll click Save to save the Custom Metric. 

How to add a Custom Google Ads Metric to a Databoard

1
 Open the selected Databoard in the Databox Designer, or create a new Databoard.
2
 Drag and drop a blank Datablock onto the Databoard from the Visualization Library. 
3
 Select the appropriate Google Ads Data Source in the righthand Property Manager. This must be the same Google Ads Account that was selected when creating the Custom Metric. 
4
 Select the  Custom tab at the top of the  Metric drop-down list. 
5
 Select the Custom Metric name to populate the Datablock.

Additional Information

  • Using the Query Builder for Google Ads, the "Criteria" Dimension differs depending on the Report you have selected. The "Criteria" returned always matches the first word of the Report selected (i.e. Keyword Performance Report ("Criteria" = "Keywords"), Gender Performance Report ("Criteria" = "Gender"), Geo Performance Report ("Criteria" = "Geo"). 
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us