Independently, Google Analytics and HubSpot can provide rich data insights about your website, CRM and inbound marketing performance. In this article, we explore how to connect these two powerful platforms to unlock even more value.
We will cover:
HubSpot contains a wealth of valuable information about your clients and prospects, such as their purchase history and lead quality. However, by default none of this information is visible within Google Analytics.
By default your digital teams are unable to access this valuable data within Google Analytics and, therefore, cannot optimise marketing strategies using it. Subsequently, this can lead to KPI Myopia and a whole range of less than pleasant results.
By importing key business metrics within HubSpot into Google Analytics you can avoid KPI Myopia and achieve the following benefits:
The first step in completing a HubSpot to Google Analytics connection is to capture the Google Analytics Client ID (or CID) across all forms present on your site.
The CID is a unique ID generated by Google Analytics, and will be used as the primary key to join user behaviours tracked in HubSpot with those tracked in Google Analytics.
The exact steps to take here will change depending on if you are using HubSpot forms or not.
Once CID has been stored at contact level, you can now export the CRM data and prepare it for upload from HubSpot to Google Analytics. Data should be exported daily (either via manual exports or the HubSpot API).
You should export the CID column along with metric columns you wish to track in Google Analytics. Common metrics to share include customer lifetime value, deal value and lead stage.
The data should be exported at contact level. It is possible to export at other levels (for example deal or company), however, this brings additional complications. Additional logic within HubSpot would need to be set up to map contacts to companies.
Once data has been exported it can now be sent to GA via Measurement Protocol.
Measurement Protocol is an API Google maintains to allow developers to send events to Google Analytics directly.
To set this up, liaise with your Analytics team and decide on an event structure that is compatible with your own GA property. The reference documentation can be found here.
Ideas include using “event_value” and “event_category” fields to send revenue updates and “event_action” and “event_category” fields to send lead status updates. Goals can then be set up based on these events for KPI reporting or for optimising paid campaigns via Google Ads.
We also recommend passing the date of revenue or lead generation to be submitted in the event label or as a custom dimension.
The dates for when the revenue and other metrics are sent to GA are not guaranteed to match the date they occurred in HubSpot – importantly these dates probably are different to the dates for when the deal/leads were generated, or the date your business considers revenue to have been generated or deals to have been closed.
Once you have decided on an event structure, you can then send these events to Google Analytics.
Hits can be sent to Google Analytics using the Google Analytics Hit Builder, although doing this daily for more than a handful of hits quickly becomes inefficient. To help overcome this challenge, Semetrical built SAM technology to manage our Measurement Protocol hits at scale.
If you want to develop your own solution, I would suggest writing a Python/Google App Script/VBA script.
Broadly the steps look like this:
Now let’s talk through some of the challenges you will face when you try to do this for real. The integration seems simple on the surface, but in reality it is anything but. We have had to develop solutions to all these problems when building SAM, our GA to CRM data integration service.
Larger CRMs will often see dozens or hundreds of changes within a given day. Keeping both data sources in sync requires daily or (in the case of Analytics 360) hourly updates.
Doing this manually quickly becomes cost prohibitive. Outside of data cleansing and manual imports/exports you also have to solve a number of problems to maintain data integrity.
Revenue values within HubSpot will change over time. You will need to devise a method to account for revenue changes per contact.
HubSpot revenue changes replace old values, whereas event values in Google Analytics append to old values as this example below demonstrates.
Client IDs are likely to be captured at contact level within HubSpot. Key business metrics, on the other hand, such as deal value or stage are kept at the deal or company level.
Furthermore, it’s common to see revenue and sales progression metrics tracked in a completely different CRM system.
Both instances require additional work to stitch up CIDs with metrics before data can be sent to GA and linked to on-site behaviour.
Keeping data in sync 100% with HubSpot requires reporting at the event level, which means having to develop your own attribution model and technology.
Data volumes quickly become quite large. For a small GA property with 20k monthly visitors, you are likely to need to pull and analyse a couple of million rows of data each month.
Doing anything more complex than first and last touch attribution becomes unwieldy via Excel and is more easily done with Python. However, this also requires additional technical expertise.
The reports you create with this data are where the majority of the insights are generated.
This is an engaging project for a technically savvy Analytics team but it is not a trivial one, and in our experience is not something you can just pull together overnight. This can take weeks or even months depending on your needs.
We’ve developed our own suite attribution models to power the reports we provide as part of our HubSpot to Google Analytics service. First touch, last touch and linear attribution models are the three that resonate best with our clients.
This is possibly the trickiest part of the entire process. Once presented, insights need to be explained and buy-in sought from each stakeholder in the marketing department.
Goals and practices will need to be changed – a process which is far from painless. Teams need to become familiar with new practices and reports before they can start generating value with this new data.
Suggestions for solving this include working with people who have experience with performance goals and ensuring that moving from conversion/traffic metrics to revenue/lead quality metrics is seen as a logical improvement and not a failure of the current approach.
It’s key that your marketers are aware of the benefits that this integration has to offer. At a fundamental level, reporting on website performance using revenue as your primary KPI is far better using form submissions or even sessions.
I hope this article has been informative. If you have any questions or are interested in setting up a HubSpot to Google Analytics connection, get in touch with us here.