Add HubSpot tracking to your Surface form to track visitor behavior, identify anonymous visitors, and gain insights into how users interact with your forms.Documentation Index
Fetch the complete documentation index at: https://docs.withsurface.com/llms.txt
Use this file to discover all available pages before exploring further.
Step 1: Get the HubSpot Tracking Script

-
Navigate to HubSpot Settings
- In your HubSpot account, click the settings icon (⚙️) in the top navigation bar
-
Access Tracking Code
- In the left sidebar, look for Account Management
- Click on Tracking Code under the Account Management section
-
Copy the Tracking Code
- You’ll see your HubSpot tracking code displayed in a text box
- Copy the entire tracking script code
- The code typically looks like:
Step 2: Enable and Add HubSpot Tracking Script in Surface Form
-
Open Form Settings
- Go to your Surface form dashboard
- Navigate to the form you want to add HubSpot tracking to
- Click on Settings
-
Toggle on Cookie Tracking

- In the form settings, look for Cookie Tracking section
- Toggle on Enable Cookie Tracking to track UTMs, first landing page, and lead sources
-
Find HubSpot Tracking Option
- In the form settings, look for Ads / Tracking section
- Click on HubSpot Tracking
-
Enable and Configure Tracking

- Toggle the Enable HubSpot tracking switch to turn it on
- Paste the HubSpot tracking script you copied in Step 1 into the script field below
- Click Save to apply the changes
