To integrate your website with HubSpot CRM, install the HubSpot tracking code on every page, then connect forms using one of three methods: native CMS or form-vendor integration (WordPress plugin, TypeForm, OptinMonster), non-HubSpot form collection in HubSpot settings, or the HubSpot Forms API. Basic integration takes 15-30 minutes; a complete integration with multiple forms, live chat, and custom properties typically takes 2-4 hours. HubSpot CRM is free, and the integration works with any platform that supports JavaScript - WordPress, Webflow, Next.js, React, Vue, plain HTML, or a custom stack.

At a glance

StepWhat to installTime
1. Install tracking codeOne JavaScript snippet before </body> on every page5-10 min
2. Pick a form methodNative integration, non-HubSpot form collection, or Forms API10-20 min
3. Verify in HubSpotSubmit a test form, confirm contact appears in CRM2-5 min

Step-by-step

1. Install the HubSpot tracking code

Copy the tracking code from Settings → Tracking & Analytics → Tracking Code in HubSpot. Paste it before the closing </body> tag on every page of your website. On WordPress, install the official HubSpot plugin and it does this for you. On Next.js or React, add the snippet to your root layout. The code drops a hubspotutk cookie that lets HubSpot link anonymous page views to a contact record after the first form submission.

2. Pick one form connection method

There are three production-ready ways to send form submissions into HubSpot CRM. Pick one based on how your forms are built today.

Option A: Native CMS or form-vendor integration

If your CMS or form vendor lists HubSpot as a native integration, activate it - but verify it uses the Forms API, not the Contacts API. Vendors that use the Contacts API skip web analytics: contacts created that way appear with an "Offline source," which breaks attribution. OptinMonster, TypeForm, and the official WordPress plugin do this correctly. When in doubt, test with a known referrer and check the contact's "Original source" property.

Option B: Non-HubSpot form collection (fastest)

Enable Settings → Marketing → Forms → Non-HubSpot Forms. The tracking code from step 1 then automatically captures every HTML form submission on your site - no extra code required. This is the fastest path if you already have HTML forms and don't need server-side validation against HubSpot data.

Non Hubspot Forms

Option C: HubSpot Forms API (most control)

Submit form data directly to the Forms API endpoint. This is the right choice when you need custom validation, server-side rendering, or a custom-built form pipeline.

POST https://api.hsforms.com/submissions/v3/integration/submit/{PORTAL_ID}/{FORM_ID}
Content-Type: application/json

{
  "submittedAt": "1779080000000",
  "fields": [
    { "objectTypeId": "0-1", "name": "email", "value": "user@example.com" },
    { "objectTypeId": "0-1", "name": "firstname", "value": "Jane" }
  ],
  "context": {
    "hutk": "{value of hubspotutk cookie}",
    "pageUri": "https://yourdomain.com/page",
    "pageName": "Page Title"
  }
}

Read the hubspotutk cookie value and pass it as context.hutk so the submission is linked to the visitor's tracking session - without it, the contact is created without web-analytics data.

The context fields the endpoint accepts:

FieldWhere it comes from
hutkValue of the hubspotutk cookie set by the tracking code
ipAddressThe visitor's IP address
pageUri / pageNameURL and title of the page hosting the form

Building a custom form pipeline? Our HubSpot integration services cover Forms API builds, CRM data sync, and middleware. We scope it in a free call and reply within one business day.

3. Connecting Google Forms or third-party tools

For Google Forms, Typeform, Tally, or any tool without a first-party integration, route submissions through Zapier or Make:

  1. Create a Zap with your form tool as the trigger.
  2. Add HubSpot - Create or Update Contact as the action.
  3. Map form fields to HubSpot properties (email is required; first name, last name, company, and any custom property work).
  4. Turn the Zap on and submit a test entry.

For Google Forms specifically, the Form to HubSpot Workspace add-on is a one-click alternative.

Why HubSpot Forms beat Google Forms for marketing

Once you're past the first integration, consider moving the forms themselves to HubSpot. Native HubSpot forms give you:

  1. Web analytics - submissions are attributed to traffic source automatically.
  2. CRM-aware logic - branching and field visibility based on what you already know about a contact (progressive profiling).
  3. Prefill from CRM - returning visitors see fields prefilled, which lifts conversion 15-30% in our agency's tests.
  4. A/B testing built in.
  5. Workflow triggers - submissions can fire nurture workflows, lead routing, or Slack alerts without glue code.

Reference

  • API documentation: HubSpot Forms API on developers.hubspot.com
  • HubSpot Forms API endpoint: https://api.hsforms.com/submissions/v3/integration/submit/{PORTAL_ID}/{FORM_ID}
  • HubSpot CRM and the tracking code are free; paid Marketing Hub tiers add advanced behavioural events, custom reporting, and higher API limits.
Is HubSpot CRM free to integrate with my website?+
Yes. HubSpot CRM is free and includes the tracking code, forms, and live chat. You can install the HubSpot tracking code on any website regardless of the platform. Premium features like custom behavioral events and advanced analytics require paid Marketing Hub plans.
How do I add HubSpot tracking code to my website?+
Copy the HubSpot tracking code from Settings → Tracking & Analytics → Tracking Code in your HubSpot account. Paste it before the closing </body> tag on every page of your website. If you use WordPress, install the official HubSpot plugin which adds the code automatically.
Can I integrate HubSpot with a custom-built website?+
Yes. HubSpot integrates with any website that supports JavaScript. Add the tracking code to your HTML, embed forms using the HubSpot embed code or Forms API, and use the HubSpot API for custom data sync. This works with React, Next.js, Vue, and any other framework.
How long does it take to integrate HubSpot CRM with a website?+
Basic integration (tracking code and a form) takes 15-30 minutes. A full integration including multiple forms, live chat, custom properties, and CRM data sync typically takes 2-4 hours. Complex integrations with custom APIs or multi-step workflows may take 1-2 days.
What data does HubSpot track on my website?+
The HubSpot tracking code records page views, session duration, traffic source, device type, and returning visitor data. When a visitor submits a form, all their anonymous tracking data is associated with their contact record in the CRM, giving you a complete timeline of their engagement.

Need help connecting your website to HubSpot? Our HubSpot integration services cover everything from tracking-code setup to custom Forms API builds, and HubSpot onboarding gets the rest of your portal configured alongside it.

Related guides