• Answer

How to connect HubSpot to a website that isn't hosted on HubSpot

If your site runs on WordPress or a site builder, HubSpot can’t see it until you install its tracking code yourself, on any plan. Without it, HubSpot can’t track traffic, page views, visitor activity or site events from a page, and non-HubSpot form submissions aren’t captured.

What the code does

HubSpot adds the code automatically to pages it hosts. On your own pages it ties the site to your account, can track HubSpot and non-HubSpot form submissions, and may enable features such as live chat widgets. It doesn’t create or install forms.

Install it in three steps

  1. Copy the code. In your HubSpot settings, go to Tracking & Analytics > Tracking code, or Tracking Code if you only have Marketing Starter or the free tools. In the Embed code section, click Copy, or pick the option that emails it to your web developer.
  2. Put it on every page, once. Most content management systems and developers can add it to all pages at once, for example through a shared footer file. HubSpot recommends its WordPress plugin, which installs the code so you don’t have to.
  3. Add your domain. Under Tracking & Analytics > Tracking Code, open the Advanced Tracking tab and click + Add domain. Skip this and submissions to HubSpot forms embedded on that domain are filtered to your spam submissions.

One code per page: with several, only the first to load fires, and installing it twice can lead to errors such as duplicate data.

How to check it works

In the same settings, enter a page’s URL under Validate your tracking code, and HubSpot tests it and emails you the results.

A Failed result can be false. A cookie consent tool can stop the tracking pixel firing if consent hasn’t been accepted, and Cloudflare can block the checker even when tracking works for visitors.

Real gaps are permanent, though: HubSpot can’t recover tracking data missed while the code was inactive.

Our take

The step that’s easy to skip is the domain. The code can be on every page while your embedded HubSpot form submissions land in spam, so we’d add the domain the day the code goes in. If the validator says Failed and you run a cookie consent tool or Cloudflare, we’d rule those out before touching the install.

About VelocityStack

VelocityStack builds websites and HubSpot setups, and we connect the two. We put the tracking code on every page, add your domains, point each form at the right contact record and set the follow-up to run once a lead comes in. See how we connect websites to HubSpot or book a 20-minute call.

Sources

  1. Install the HubSpot tracking codeknowledge.hubspot.com
  2. Set up site tracking in HubSpotknowledge.hubspot.com
  3. Troubleshoot the HubSpot tracking codeknowledge.hubspot.com

Found an error? Tell us.

Related service CRM and automation