Overview: HubSpot Marketing Contacts Query Builder
We run live help sessions every week where you can get personalized assistance in tracking your HubSpot data in Databox. Sign up here.
In this article, we'll give an overview of the HubSpot Marketing Contacts Query Builder and work through an example based on a specific use case.
Please note that no daily data is available for those Metrics. Only total values for selected Date Range.
IN THIS ARTICLE
1. Custom Query overview
dimensionsparameter breaks down metrics by common criteria, such as
Owner. The metric output is then recategorized based on the selected dimension value.
If a query has no
dimensionselected as a parameter, the returned metric will provide aggregate values, such as the overall number of contacts that Became a Lead in the given date.
Same period last year.
The "Data Preview" section allows you to see all values that are being pulled in based on the query you have created. At the bottom, you can find the total values bolded. To see data previews for different date ranges, click on the various tabs at the top of the preview.
In this example we want to show how many contacts became a lead last month, and split the results by the different sources they came from. Here's what we're replicating from HubSpot's UI.
1. We'll name our custom query "Became a Lead by Source".
2. For the metric, select "Became a Lead."
3. The dimension for this example is "Original Source."
4. In the date range field, choose which intervals you want to display the data for. Since our goal is to show the data for "Last month," we need to make sure we select that time interval. Keep in mind that you can choose more than one date range!
5. We also want to compare the data to the previous period, so we will choose "Compare with: Previous period".
Our query is all set up! The next step is to run the query and use the Data Preview section to view the data that is being pulled in, filtered by source.
If everything looks good, save the custom query. From the Designer, you can now select the new custom metric from the "Custom" tab of the metric drop down list.
NOTE: This custom query will only be available if you have the correct data source selected.