Overview: Query Builder for Google Analytics (Report)

With the Query Builder for Google Analytics, you can create Custom Google Analytics Metrics using a combination of Metrics, Dimensions, Segments, and Filters. 

Some popular use cases for the Query Builder for Google Analytics include creating content-specific Metrics, reporting on custom Goal Conversions, and accessing additional Date Ranges for Google Analytics Metrics.

HOW TO

How to access the Query Builder for Google Analytics

Navigate to Metrics > Query Builder to access the Query Builder. Click the green + New Custom Metric button and select your connected Google Analytics 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 Analytics 

A
  Data Source: This is the Data Source that the Custom Metric is syncing data from. 
B
  Metric: Select a Metric from your connected Google Analytics Data Source, such as Sessions, Pageviews or Pages / Session. Certain Metrics, like Goal 2 Completions, allow you to report on custom Goals set within the Google Analytics Account. 
C
  Dimension (Optional): The Dimensions parameter re-categorizes the returned Metric value based on common criteria. Examples of Dimensions are Default Channel Grouping, Pages, and Device Category. If no Dimension is selected, the Custom Metric will store 1 aggregated Metric value for each Date Range. 
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 "Sessions by Default Channel Grouping," "Pageviews by Page," or "Pages / Session by Device Category."

Most tables in Google Analytics organize Dimensions into rows and Metrics into columns. In order to replicate the Google Analytics table below in Databox, you would need to create 6 Custom Metrics: "Users by User Type," "New Users by User Type," "Sessions by User Type," "Bounce Rate by User Type," "Pages / Session by User Type," and "Avg Session Duration by User Type."

add_user_popup@2x

D

   Invert Metric (Optional): This checkbox should be selected if a lower Metric value indicates positive growth / performance (i.e., Unsubscribers, Cost per Conversion, etc.) Inverting the Custom Metric in Databox will make it so an increase in the Metric value will show a red percentage change color on a Databolock, while a decrease in the Metric value will show a green percentage change color on a Datablock. 

E
  Segment (Optional) A segment is a subset of your Analytics data. For example, out of your entire set of Users tracked, one Segment might be Users from a particular Country. Another Segment might be Users who purchase a particular line of products, or Users who came to your website from an Organic Source. 
Learn more about creating Segments in Google Analytics here.
F
  Metric Sort Order: Choose either an "Ascending" or "Descending" sort order for the returned Custom Metric values. "Descending" is the default sort order and should be selected for any Metrics where higher Metric values are desired (like "Sessions" and "Pageviews"). "Ascending" sort order should be selected for Metrics where lower Metric values are desired (like "Bounce Rate" and "Cost per Click").
Learn more about the significance of the Metric Sort Order here.
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.
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 Analytics Account for each field. Learn more  here .
H
  Preview data: After clicking Preview data, 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. 
I
  Custom Metric Name: Enter a name for your Custom Metric. This Custom Metric name will be available in the Designer after saving. 
J
  Save: Save your Custom Metric. 

How to create a Custom Google Analytics Metric [Example]

In this example, we'll create a Custom Metric to report on New Users tracked in the Google Analytics Account split up based on the Country where the User accessed the website. We only want to view this data for New Users that found the website through Organic Search. 

1
 Navigate to Metrics  > Query Builder   
2
 Click the green + New query button
3
 Select the appropriate Google Analytics Data Source
4
 Select New Users from the Metric drop-down list  
5
 Next, we'll select Country from the Dimensions drop-down list so that the New User values returned are split up based on the Country where the site was accessed. 
6
  Organic Traffic is a standard Segment in every Google Analytics Account, so we will select this from the Segment drop-down list to focus on the Organic subset of New Users. 
7
 Since New Users is a Metric where higher values indicate success, we don't need to select a Metric Sort Order and can rely on the default setting, which is Descending. 
8
 We don't need to further Filter the data, so we will leave the Filter section blank as well. 
9
 In order to accurately explain what this Custom Metric is reporting on, we'll name the Custom Metric "New Organic Users by Country" 
10
 Click Preview Data to generate a Data Preview of the Custom Metric. 
11
 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 Analytics 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 Analytics Data Source in the righthand Property Manager. This must be the same Google Analytics 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

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