Skip to main content
HubSpot Embedded Form Code

Learn how to place custom code on your website that sends data to Everflow when a HubSpot form is submitted.

Dasha Shareyko avatar
Written by Dasha Shareyko
Updated over 3 months ago

Overview

Please note that not all websites behave the same. This article is advanced and your site / form might be slightly different and possibly not work correctly. If you are having any issues please contact our support or your account manager.

💡Note💡

You will need both Click Script and Conversion Script to make this integration work. We will show you where to find all the required information in this detailed step-by-step.


Step #1

  • Implement your HubSpot form on your website. For more info - [Click Here]

    If you are not using a HubSpot embedded form, please reach out for assistance with a custom setup.

Step #2

  • If not already done, set up the Offer you want to track data back to Everflow with. For more info - [Click Here]

Step #3

  • Place your Everflow Click Script on the landing page (Base Destination URL).

💡Note💡

Your Click Script can be found by navigating to your intended HubSpot Offer you created during the Step #2.

  • Go to Offers - Manage - Click on your selected Offer.

  • Navigate to the General tab - Tracking > Click.

  • Copy the code.

Step #4

  • Update the Conversion Script with your tracking domain and Advertiser (or Brand) ID

  • To find Tracking Domain:

Grab the tracking domain from the Offer by navigating to Offers → Manage → Click the Offer → Copy the domain.

In this example, the domain is: www.strcli9k.com

  • To find the Advertiser ID:

On the same page, copy the Advertiser ID.

In this example, the Advertiser ID is: 32

Step #5

  • Input the two values (Advertiser ID and Tracking Domain) you copied into the custom code below:

<script type="text/javascript"    src="https://INPUT_TRACKING_DOMAIN/scripts/sdk/everflow.js"></script>

<script type="text/javascript">
window.addEventListener('message', event => {
if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmit') {
for (i = 0; i < event.data.data.length; i++){
if (event.data.data[i].name == "email") {
var ef_email = event.data.data[i].value;
EF.conversion({
aid: INSERT_ADVERTISER_ID,
email: ef_email,
});
}
}
}
});
</script>

Step #6

  • Place the code on the page where your form is located (you can place the code on the landing page as well).

Note

If the code above does not work, you may need to use this version depending on the specifics of your Hubspot form itself.

  • In that case, input the two values (Advertiser ID and Tracking Domain) you copied into the custom code below:

<script type="text/javascript"
src="https://INPUT_TRACKING_DOMAIN/scripts/sdk/everflow.js"></script>

<script type="text/javascript">
window.addEventListener("message", function(a) {
if ("hsFormCallback" === a.data.type && "onFormSubmit" === a.data.eventName)
var b = a.data.data
for (var key in b) {
if (key === "email") {
EF.conversion({
aid: INSERT_ADVERTISER_ID,
email: b[key]
})
}
}
});
</script>


Did this answer your question?