HubSpot
Last updated
Last updated
This guide explains how to integrate Instruqt tracks within HubSpot, a Customer Relationship Management (CRM) system for marketing, sales, and customer service.
Integrating Instruqt tracks within HubSpot is based on embedding tracks with a custom parameter into HubSpot landing pages and processing user interactions with these landing pages through webhooks with a workflow automation tool like Zapier.
The customer parameter holds the HubSpot contact ID and is the key element in the integration as it travels from step to step, connecting all systems involved:
Let's zoom in on the steps and systems in this integration:
HubSpot has a landing page with an embedded Instruqt track that holds the HubSpot contact ID as the custom parameter icp_hsid
in the src
property of its <iframe>
element. For example:
Your prospect starts playing the embedded Instruqt track.
↳ The Instruct platform receives the custom parameter icp_hsid
, strips the icp_
part, and processes it further as the custom parameter hsid
with the value 16025401
through webhooks events like track.challenge_started
. The message content of the webhook event looks like this:
Zapier catches the webhook message from the Instruqt platform and processes a Create Engagement in HubSpot
action that writes a Note in HubSpot for the HubSpot contact that contains the track ID
and starting time
.
With such an integration, you can keep track of statistics such as how many times a prospect has played your Instruqt track. Prospects who have played a track more than once are likely to have more potential so that you can focus on them.
You must be added as a contact in HubSpot. And the same applies to the prospects that you want to track.
Now let's create an integration yourself.
Start with generating and copying the HTML <iframe> embed code from Instruqt:
Open your browser and go to play.instruqt.com. ↳ Instruqt shows your content.
Click the TRACK_NAME of the track you want to embed. ↳ Instruqt shows the corresponding Track overview page.
Click Edit track details followed by Embed.
↳ The Embed page opens. And under Embed Iframe
you will see a code snippet like this:
⇨ TEAM
, TRACK_NAME
, and YOUR_GENERATED_TOKEN
will contain your team, track name, and token in the src-line.
Click Copy embed code.
Now move over to HubSpot to embed the track in a landing page:
Navigate to app.hubspot.com. ↳ HubSpot opens the User Guide page.
Click Marketing > Landing pages. ↳ You see a list of all landing pages.
Click Create > Landing page. ↳ The Create a page pop-up opens.
In the Page name field, enter a name for your landing page—for example, Introduction to GreatApp
.
↳ The Choose a template page opens.
Select the Landing page template and click Select template. ↳ Your new landing page opens in edit mode.
Drag a Rich Text module from the Add tab onto your landing page.
Delete the prefilled text from the added Rich Text module.
Click Advanced > Source code. ↳ The Edit source code pop-up opens.
Paste the earlier copied embed code into the pop-up.
Modify the pasted embed code to this:
⇨ TEAM
, TRACK_NAME
, and YOUR_GENERATED_TOKEN
will contain your team, track name, and token in the src-line.
↳ Notice the {{contact.hs_object_id}}
variable in the src-line that will be replaced with the actual contact ID when your prospect opens the landing page. The actual contact ID is sent to Instruqt, and Instruqt processes it further as the custom parameter hsid
.
Click Save changes. ↳ You see a preview of your track now.
Click Save to store your landing page.
HubSpot can't process Instruqt webhook events directly, but the workflow automation tool Zapier can, and Zapier has a connector for HubSpot. So, Zapier is used as an intermediary between Instruqt and HubSpot:
Create a new Zap.
Configure the Webhooks by Zapier trigger.
Select the Catch Hook trigger.
Copy the Custom Webhook URL that Zapier created for the Catch Hook trigger.
Go to Instruqt Web UI and add an endpoint with the copied URL.
Now go back to HubSpot to view your newly created landing page and start the embedded track:
Your landing page is still opened in edit mode. From here:
Click Publish to publish your landing page. ↳ The Publish landing page pop-up opens.
Click Publish now. ↳ The Published page opens.
Click More > View. ↳ The new landing page with the embedded track opens in a new browser tab.
Click Launch in the embedded track. ↳ The Instruqt platform creates the environment.
Click Start to play the track.
↳ Instruqt fires webhook event messages for this track now, which can be caught by the Zap. These webhook messages contain the custom parameter hsid
which holds the HubSpot contact ID.
Now go back to Zapier to finish catching and processing the webhook events:
Click Test trigger and select the request that Zapier caught. ↳ Zapier shows the Instruqt webhooks message. Notice the custom parameter:
Click Continue.
Click + to add a new action to your Zap and select HubSpot.
In the Action Event list, select Find Contact and click Continue.
In the Choose account list, select your HubSpot account and click Continue. ↳ The Set up action dialog opens.
In the First search property name list, select Contact information: contact ID.
In the First search property value list, select Custom Parameters Hsid.
Click Continue and test the action.
Click + to add a new action to your Zap and select HubSpot.
In the Action Event list, select Create Engagement and click Continue.
In the Choose account list, select your HubSpot account and click Continue. ↳ The Set up action dialog opens.
In the Engagement Type list, select Note.
In the Note Body field, enter Started track, and in the Insert Data list, select the Catch Hook trigger
.
Click Show all options and click the Track id item to insert it into the Note Body.
In the Id's of the contact objects that should be associated with engagement list, select the ID item from the Find Contact in HubSpot
action.
Click Continue and test the action.
Click Turn on Zap.
Create Enterprise Event action
If you have the Marketing Hub Enterprise plan for HubSpot, you can add a Create Enterprise Event
action to your Zap instead of the Create Engagement
action.
Now go back to HubSpot to view the note that Zapier created on behalf of Instruqt:
Click Contacts > Contacts. ↳ The Contacts page opens.
Click your name to open your contact details. ↳ The Contacts details page opens.
This video tutorial shows you how to embed a HubSpot form into a track:
Magnificent! Every time a prospect plays a track from your landing page, a note is written in HubSpot. This way you can track which prospects have a high potential. And inspired by this guide, you can design and build your own integration if you want to.
Do the same for the Timestamp item. ↳ Your Note Body should look something like this:
Click the Notes tab. ↳ You see the note that Zapier created: