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
| Step | What to install | Time |
|---|---|---|
| 1. Install tracking code | One JavaScript snippet before </body> on every page | 5-10 min |
| 2. Pick a form method | Native integration, non-HubSpot form collection, or Forms API | 10-20 min |
| 3. Verify in HubSpot | Submit a test form, confirm contact appears in CRM | 2-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.

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:
| Field | Where it comes from |
|---|---|
hutk | Value of the hubspotutk cookie set by the tracking code |
ipAddress | The visitor's IP address |
pageUri / pageName | URL 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:
- Create a Zap with your form tool as the trigger.
- Add HubSpot - Create or Update Contact as the action.
- Map form fields to HubSpot properties (email is required; first name, last name, company, and any custom property work).
- 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:
- Web analytics - submissions are attributed to traffic source automatically.
- CRM-aware logic - branching and field visibility based on what you already know about a contact (progressive profiling).
- Prefill from CRM - returning visitors see fields prefilled, which lifts conversion 15-30% in our agency's tests.
- A/B testing built in.
- 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?+
How do I add HubSpot tracking code to my website?+
Can I integrate HubSpot with a custom-built website?+
How long does it take to integrate HubSpot CRM with a website?+
What data does HubSpot track on my website?+
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
- How to Publish Your HubSpot Website to a Custom Domain - the next step once your site and CRM are connected.
- HubSpot Chatbot Guide - add live chat and chatflows to the same tracking code you just installed.
- HubSpot Custom Objects: Ultimate Guide - when form data needs to land on more than contacts and companies.

