Overview: Google Ads Query Builder

In this article, we will create a custom query using the Google Ads Query Builder in order to highlight the features and functionality of the tool. For this example, we will be creating a new metric that will give us the number of Conversions sorted by Ads, where Ad Group equals Florida Ads and Device contains Mobile.

IN THIS ARTICLE

1. Basic Options

A
  Custom Query Name: In this field you can create a name for your custom query. Afterwards you will find this name/title as a metric option in the designer after saving the query.
We chose "Conversions by Ad from Florida Ads group" for our query name.
B
   Report (required): Select a report from which you want to see your data. Choose between many reports available from Ads.
We chose "Ad Performance Report" for our report.
C
   Metric (required): Select a metric from the chosen report such as conversions, cost, view rate, clicks, impressions, etc. A metric can be used in conjunction with dimensions.
D
   Dimensions (optional): The dimensions parameter breaks down metrics by common criteria such as by campaign or ad (like in our example). When dimensions are requested, values are segmented by the dimension value. If a query has no dimensions parameter, the returned metrics will provide aggregate values for the requested date range, such as "overall clicks".
E
   Date range (required): To display your data the way you like, you will need to choose time intervals. Just click on the "Date range" field. Selected intervals will be enabled for the new metric.
F
  Compare With (optional): Select a date range to compare your selected interval to. This date range will be used for "previous line" on line and bar charts, and for calculating change percentage. Options are: None, Previous period and Same period last year.

2. Advanced Options

In our example, we have set up filters in order to retrieve data only for ads, where ad group does not equal Florida Ads and device contains Mobile.
G
   Filter by (optional): You can filter results by dimensions or by specific metrics. Filters can be combined using the AND boolean logic. Filtered queries restrict the rows that do (or do not) get included in the result. Each row in the result is tested against the filter. If the filter matches, the row is retained. If it doesn't match, the row is dropped.
H
   Data Aggregation: You have to aggregate your data if there are multiple records with matching dimensions. Options for Data aggregation are None, SUM, AVG, MAX and MIN.

Filter Operators

Dimension Filters:

  • Contains: Aggregate metrics where the campaign contains Mobile
  • Contains (case insensitive): Aggregate metrics where the campaign contains Mobile no matter if there are large or small letters.
  • Does not contain: Aggregate metrics where the campaign does not contain Mobile
  • Does not contain (case insensitive): Aggregate metrics where the campaign does not contain Mobile no matter if there are large or small letters.

Metric Filters:

  • Equals: Return results for ads where name of ad group is exactly Florida Ads
  • Does not equal: Return results for ads where name of  ad  group is not Florida Ads
  • Greater than: Return results for ads where the value of filter is strictly greater than 100
  • Less than: Return results for ads where the value of filter is strictly less than 100
  • Greater than or equal to: Return results for ads where the value of filter is 100 or more
  • Less than or equal to: Return results for ads where the value of filter is 100 or less
When everything mentioned above is set, click "Run query" to show Data preview.

3. Data preview

In Data Preview you will see all values for selected metrics and date ranges. At the bottom, you can check total values. Just click on tabs to switch between date ranges, if you have previously selected more than one.

If you want to sort values by date/time, Dimensions or Values just click on the arrow next to it.

When your query is ready, click "Save query". This creates a metric in Databox, with the previously entered query name ( In our case "Conversions by Ad from Florida Ads group).

By default, a metric will be added within the data source that the data is pulled from. It is possible to change the currently used data source by clicking on "Change target data source" in the top right of the screen.

Transformations

Rename Dimension:

It is possible to rename dimensions. Best practice is to rename them before saving the query. You can do this by clicking "..." next to "Dimension" and then select "Rename dimension"

Skip Dimension:

This function is useful when you want to exclude one or more dimensions. For example, this would be useful if you want to show data for all regions except one. Click "..." next to "Dimension" and select "Skip dimension"

Round values:

Click "..." next to "Value" and select "Round values." Enter the number of decimal places to be rounded to into field in the popup, and values will be rounded accordingly.

Still need help? Contact Us Contact Us