HubSpot is a completely managed cloud-based service for customer relationship management. It can be used to manage marketing, sales and service.

  • Software-as-a-Service’ products like HubSpot spare businesses the effort of building custom solutions but at the same time rob them of the opportunity to run custom analytics and reporting on their data.
  • Looker Studio ( Google Data Studio) helps businesses create dashboards and reports for executive decision-making.
  • It can connect to a number of data sources including on-premise and cloud-based ones. This post is about the steps involved in connecting HubSpot to Looker Studio.

Methods to Connect HubSpot to Looker Studio

  1. Looker Studio does not provide a HubSpot connector but it allows data to be uploaded in the form of Google Sheets.
  2. HubSpot also provides APIs that allow data to be downloaded into many file formats. In this article, you will learn how to use different API’s provided by Google Sheets and HubSpot to move data into Google Data Studio.
Seamlessly Integrate HubSpot Data with Hevo

Looking to connect HubSpot data to your systems? Hevo supports HubSpot as a source, making it easy to integrate your HubSpot data into various destinations.

Why Use Hevo for HubSpot Integration?

  • Effortless Data Transfer: Connect HubSpot to any destinations with ease.
  • Real-Time Data Sync: Keep your HubSpot data current and accurate across platforms.
  • No-Code Interface: Set up and manage your integration without technical expertise.

Trusted by 2000+ Customers
See why industry leaders such as Thoughtspot choose Hevo for reliable and efficient data integration.

Get Started with Hevo for Free

Pre-requisites

  • A HubSpot admin account and API token generated from that account
  • A Google account
  • Basic understanding of business intelligence tools

Using a CSV File Generated via HubSpot APIs

This method uses Google Sheet’s app script mechanism to fetch data from HubSpot APIs to feed data to Data Studio. 

  1. Go to the HubSpot Admin section and generate API keys.  For this, go to Settings > Integrations > Generate API keys. 
  2. Go to Google Sheets and create a new sheet. In the new sheet, go to Tools 》Script Editor and start editing the script. You will begin by adding the header for Google Sheet.
var ss = SpreadsheetApp.getActiveSpreadsheet(); 
var sheet = ss.getSheetByName('Blad1'); 
sheet.clear(); 
sheet.appendRow(["Dealname", "Dealstage", "Close date", "Amount"]); 
  1. You will now write a function to fetch JSON from HubSpot API. For this exercise, we will be using the deals API of HubSpot. 
var offset = 0; 
var queryParams = '&limit=250&offset=' + offset + '&properties=dealname&properties=dealstage&properties=closedate&properties=amount' 
var _url = 'https://api.hubapi.com/deals/v1/deal/paged?hapikey=' + api_key
var options = { "method": "GET", "muteHttpExceptions": true };
var apiResponse = UrlFetchApp.fetch(url + endpoint,options); 
var output_json = JSON.parse(apiResponse);
  1. You will now write values to the sheet we created using the below snippet.
while (output_json.status !== "error" && i < output_json.deals).length) {
        var dealname = output_json.deals[i].properties.dealname.value;
        var dealstage = output_json.deals[i].properties.dealstage.value;
        var closedate = new Date((output_json.deals[i].properties.closedate.value));
        var amount = output_json.deals[i].properties.amount.value;
        var deals = [dealname, dealstage, closedate, amount];
        sheet.appendRow(deals);
      }

You can set this function to be run based on a periodic trigger or use the custom function itself in the Google Sheet cell.

  1. The next step is to go to Data Studio connections and add the above Google Sheet as the source. To do this go to Data Studio and click on “Report” .
  2. Select Google Sheet when Data Studio asks for the data source and select the relevant sheet.

Once the sheet is selected, you should be able to create reports using data from HubSpot. The advantage of this approach is that you can ensure the sheet has the latest data by configuring the script to execute periodically or on-demand.

Download the Guide on How to Set Up a Data Analytics Stack
Download the Guide on How to Set Up a Data Analytics Stack
Download the Guide on How to Set Up a Data Analytics Stack
Learn how to build a self-service data analytics stack for your use case.

Limitations of this Approach

The above approach comes with its own share of pitfalls too:

  1. This method currently handles only the first page of results from HubSpot API. You will need additional custom development to implement pagination and get hold of your complete data. In other words, getting this to production needs an expert developer.
  2. In most cases, companies will need transformations to be executed on source data before creating reports in Data Studio. Such transformations are difficult to handle in the above approach. 
  3. Other than the deals API, HubSpot provides a number of APIs to extract data. Using all these APIs and integrating to Data Studio will need a herculean effort in developing as well as learning HubSpot APIs.

Learn More About:

Setup Looker HubSpot Integration in Quick Simple Steps

Conclusion

  • You have learned how you can move data from HubSpot to Google Sheets and then pull this data into from Hubspot to Google Data Studio.
  • However, it involves many steps and can be tedious. A simpler solution could be to integrate data from HubSpot and different sources so that data is analysis-ready and can be visualized easily in Data Studio.

Now, you may want to go one step further and perform an analysis on the HubSpot data. Hevo Data will automate your data transfer process, hence allowing you to focus on other aspects of your business like Analytics, Customer Management, etc. This platform connects to 150+ multiple sources, out of which some sources like HubSpot can be even used for free to transfer data to Cloud-based Data Warehouses. Try a 14-day free trial and experience the feature-rich Hevo suite firsthand. Also, check out our unbeatable pricing to choose the best plan for your organization.

Frequently Asked Questions

1. Does Google Data Studio connect to HubSpot?

Yes, Google Data Studio can connect to HubSpot. You can use the HubSpot connector available in Data Studio to visualize your HubSpot data.

2. Can HubSpot integrate with Google?

Yes, HubSpot integrates with various Google products, including Google Analytics, Google Ads, and Google Sheets. This integration allows for seamless data transfer and reporting.

3. How do I connect my HubSpot domain to Google?

To connect your HubSpot domain to Google (e.g., for Google Analytics):
-Go to your HubSpot account settings.
-Navigate to Tracking & Analytics > Analytics Tools.
-Enter your Google Analytics tracking ID.
-Follow the prompts to complete the integration.
For connecting your domain to Google Search Console, verify ownership through the domain settings in HubSpot or by adding a TXT record to your DNS.

Talha
Software Developer, Hevo Data

Talha is a Software Developer with over eight years of experience in the field. He is currently driving advancements in data integration at Hevo Data, where he has been instrumental in shaping a cutting-edge data integration platform for the past four years. Prior to this, he spent 4 years at Flipkart, where he played a key role in projects related to their data integration capabilities. Talha loves to explain complex information related to data engineering to his peers through writing. He has written many blogs related to data integration, data management aspects, and key challenges data practitioners face.