Framework Guides

HubSpot CMS

Install the Ours Privacy Web SDK on HubSpot CMS pages and landing pages using the site header HTML setting, including the plan requirement to know about.

Use this page to install the Ours Privacy Web SDK on a website or landing pages hosted on HubSpot CMS, now part of Content Hub.

Note: This page covers installing tracking on HubSpot-hosted pages. To send events from Ours Privacy into HubSpot as a CRM destination, or to receive HubSpot form submissions as a source, see the HubSpot destination and HubSpot source instead.


Before You Start

Editing head HTML on HubSpot requires a paid tier, and the site header HTML field is not available on their lower tiers. HubSpot changes what is included at each tier, so check their current pricing page for the one you need. If the field is not available to you, install through Google Tag Manager instead if your account already has it.

Check your plan before starting, since this is the most common reason an install stalls partway through.


Steps to Integrate Ours Privacy with HubSpot CMS

1. Copy your install snippet

Copy your install snippet from the Install Ours page.

2. Add the snippet site-wide

  1. In HubSpot, open Settings, then go to Content > Pages.
  2. Select the Templates tab.
  3. Find Site header HTML and paste your snippet into it.
  4. Save your changes.

This applies tracking to every HubSpot-hosted page and landing page on that domain. If you host several domains in HubSpot, set the header HTML per domain using the domain selector at the top of the page.

3. Add the snippet to a single page (alternative)

For one page only, open the page editor, go to Settings > Advanced options, and paste the snippet into the head HTML field for that page.

4. Publish and verify

  1. Publish the page and open the live URL, not the preview.
  2. Open the browser console to check for script errors.
  3. In your Ours Privacy account, check Recent Events to confirm page views are arriving.

Running Alongside the HubSpot Tracking Code

Ours Privacy and the HubSpot tracking code can both run on the same page. They operate independently.

If you use HubSpot's cookie banner, it may block scripts until a visitor consents, which will delay or prevent Ours Privacy from loading. Decide which consent tool owns that decision, then configure the other to match. See Cookie Consent installation.


Track Custom Events

Call ours('track', ...) from a custom module or an HTML block:

ours('track', 'Form Submitted', { form_name: 'demo_request' });

Next Steps

If you need further assistance, contact us at support@oursprivacy.com.

How is this guide?

On this page