Overview: HubSpot Marketing Landing Page Query Builder

In this article, we will create a Custom Metric using the HubSpot Marketing Landing Page Query Builder in order to highlight key functionalities of the tool. For our example, we will create a new metric that returns the Bounce Rate for each of our active HubSpot Landing Pages. 


  1. Basic Options
  2. Advanced Options
  3. Data Preview
  4. Additional Info

1. Basic Options

   Custom Metric Name (required): Create a name for your custom metric in this field. You will find this name/title as a metric option in the Designer after saving the query.
We chose "Bounce Rate by Landing Page" for our query name.
   Metric (required): Select a Landing Page metric from your connected HubSpot Data Source, such as Submissions, Avg Time on Page, Entrances, Exit Rate, CTA Views, etc. 

We chose "Bounce Rate" as our Metric selection.

   Dimension (required): The  dimension parameter breaks down the metric by a common criteria. For this Query Builder, the only Dimension option is "Landing Page." By selecting this option, the metric will be recategorized based on the Landing Page the activities were tracked on.
   Date Range (required): To display your data the way you like, you will need to select the Date Ranges you want as options for this custom metric. You can select up to 8 Date Ranges for each custom metric. 
  Compare With (optional): Select a Comparison period option. This  will be used for "previous line" on Line and Bar Charts, and for calculating the percentage change. Options are:  NonePrevious period and  Same period last year.

2. Advanced Options

In our example, we set Filters in order to retrieve data only for "active Landing Pages." We are identifying "active Landing Pages" as those that have Pageviews tracked for the specified Date Range. 
   Filter by (optional): You can filter results by the Landing Page Dimension, or by specific metric values. Filters can be combined using AND / OR boolean logic. Filtered queries restrict the rows that do (or do not) get included in the result. Each piece of data returned from this query is tested against the filter. If the filter matches, the row is retained. If it doesn't match, the row is dropped.

3. Data Preview

In the Data Preview, you will see the total values returned for the specified Date Range. All results are pushed to the end date of the requested Date Range. You can click on the Date Range tabs to view the Data Preview for additional Date Ranges.

If you want to sort values by date/time just click on the arrow next to "Date"

When your custom metric is ready, click Save query. This creates a custom metric under your HubSpot Marketing Data Source, with the metric name you specified in section A (i.e., Bounce Rate by Landing Page).

By default, the custom metric will be added within the Data Source that the data is pulled from. It is possible to change the Target Data Source by clicking on Target data source hyperlink in the top right of the Query Builder. Unless this is necessary for a specific use case, we do not recommend changing the Target Data Source. 

4. Additional Info

  1. If there is no data returned for the specified Date Range(s), no data will be displayed in the Data Preview. 
  2. Data is only available for published Landing Pages.
  3. Metric Clarification: "Average Time on Page" is the average amount of time a visitor stays on a particular page. This is calculated by the following equation: Total Time on Page / Pageviews on Page.
  4. Since daily data is not available for these metrics, you will want to view your custom Landing Page metrics on a Visualization Type that does not necessitate granularity options. Line Charts and Bar Charts will not be good Visualization Types for this data, but Tables, Pie Charts, and Number Blocks will be.

Still need help? Contact Us Contact Us