THIS ARTICLE WILL HELP YOU:
- Convert-HubSpot Integration
- Add Tracking Code Snippets
- Activate Integration Manually
- View Convert data in HubSpot
Convert-HubSpot Integration
HubSpot is a full-featured marketing suite that includes a landing page builder, tools for email and SEO, a form builder for gating content, and a repository for managing leads generated from campaigns. In HubSpot you can also define visited URL events, submitted form events, clicked element events, and custom events, and HubSpot will count when such an event is completed. You can then analyze these completions with the events analytics tool and see how many events are completed in a certain timeframe.
This article will walk you through how to send data from Convert experiences/variations to your HubSpot account. For each experiment, the integration will pass along the experiment name and variation name that the visitor is currently bucketed into (if any) as a snapshot.
Add Tracking Code Snippets
Make sure the Convert tracking code and the HubSpot tracking code are installed on your page. HubSpot tracking code looks like this:
Activate Integration Manually
Once you have the two tracking codes in your website, then you should add this extra code to track custom events (one for experiment name and one for variation name). You can add this to the Project Global Javascript section or directly on your pages, after the HubSpot and Convert tracking codes.
var refObject = window['convert']['data']['experiments']
for (var key in window["convert"]["currentData"]["experiments"]) {
if (!window["convert"]["currentData"]["experiments"].hasOwnProperty(key)) {
continue;
}}
var currentExperiment = window["convert"]["currentData"]["experiments"][key];
var curExperimentName = refObject[key] && refObject[key].n ? refObject[key].n : "unknown experiment name";
curExperimentName = curExperimentName.replace("Test #", "Test ");
var curVariant = currentExperiment['variation_name'] ? currentExperiment['variation_name'] : "unknown variant";
curVariant = curVariant.replace("Var #", "Variation ");
var _hsq = window._hsq = window._hsq || [];
_hsq.push(["trackEvent", {
id: curVariant,
value: ''
}]);
View Convert data in HubSpot
After integration is enabled and your experiment is activated, you will be able to find in your HubSpot account the custom user data that you sent. Please note: Events will only be processed for accounts with Marketing Hub Enterprise. Tracked events can show up in contacts' timelines.
In your HubSpot account, navigate to Reports > Analytics Tools. Click Behavorial Events. You will see a table with the Variation IDs you just sent.