Overview: HubSpot Marketing Blog Query Builder
In this article, we will create a Custom Metric using the HubSpot Marketing Blog Query Builder in order to highlight key functionality of the tool. For our example, we will create a new metric that returns the Bounce Rate for each of our active HubSpot Blog Posts written by Tory Sher.
IN THIS ARTICLE
1. Basic Options
We chose "Bounce Rate by Landing Page" for our query name.
We chose "Bounce Rate" as our Metric selection.
dimensionparameter breaks down the metric by a common criteria. For this Query Builder, the only Dimension option is "Blog Post." By selecting this option, the metric will be recategorized based on the Blog Posts the activities were tracked on.
Same period last year.
2. Advanced Options
In our example, we set Filters in order to retrieve data only for "active Blog Posts." We are identifying "active Blog Posts" as those that have Pageviews tracked for the specified Date Range.
- Blog Post
All Metric options from section B are available as Filters.
When everything mentioned above is set, click Run query to show the Data Preview.
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 Blog Post (Tory Sher)).
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.
- If there is no data returned for the specified Date Range(s), no data will be displayed in the Data Preview.
- Data is only available for published Blog Posts.
- 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.
- Since daily data is not available for these metrics, you will want to view your custom Blog Post 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.
- When using Filters to create custom metrics, data will only be returned for Blog Posts published within the last 2 years.