All Collections
Integrations
HubSpot
How To Setup Tracking For Embedded HubSpot Marketing Forms
How To Setup Tracking For Embedded HubSpot Marketing Forms

Learn how to setup tracking Events for embedded HubSpot Marketing Forms.

Updated over a week ago

👋 Start Here

Using HubSpot marketing forms will enable the Cometly pixel to automatically capture information submitted through the form. You must have a thank you page that the form redirects to that fires an event.

Important: This setup will only work for embedded HubSpot lead capture marketing forms. This will not work for embedded meeting links where a prospect can schedule.

Step 1: Install Comet base code pixel in your funnel

Install the Cometly base code pixel on every page of your funnel inside the <head> tags.

You can install the base code pixel on any page builder. For the example below we are using a ClickFunnels funnels, simply install it within the <head> tag in the funnel's settings. This action will automatically apply the code across all pages within the funnel.

Add the Cometly base code in the <head> tag area

Step 2: Retrieve the HubSpot form embedded code and convert the code in Cometly

If you have multiple spaces, ensure that you are using the correct space has a unique Cometly pixel.

Login to HubSpot

On the top menu bar, click Marketing > Lead Capture > Forms

Find the HubSpot form you want to track, and click edit.

Click Share on the form page in HubSpot and then click Embed Code

Copy the HubSpot form code and paste into Cometly HubSpot form code converter.

After pasting the embedded code, click Convert Marketing Form Code

Click Copy Code after it has been converted

Paste the converted code into the html embed on your landing page, this will be replacing the existing HubSpot form code that you previously had on your landing page. You should only have the Converted Marketing Form Code, not the original code from HubSpot.

Step 3: Install your event on the thank you page that the form redirects to

You must have a thank you page that the HubSpot form redirects to after a successful form submission.

To add or edit the URL the form redirects to, follow the steps below:

Login to HubSpot

On the top menu bar, click Marketing > Lead Capture > Forms

Find your form in HubSpot and click Edit

Click Options, then click Redirect to another page and add your URL for your thank you page.

Make sure you save changes by clicking Update

The thank you page must have the Cometly Pixel Code in the <head> tags of the page.

Step 4: Send event to Cometly

There are two ways to send events to Cometly: Server and Browser.

Did this answer your question?