Integration

Foundation CMS and HubSpot

HubSpot is a setting on a Foundation CMS site: enter the account ID and the site loads HubSpot's tracking code behind its own privacy box, and tells HubSpot the visitor's answer so HubSpot's cookie banner stays off. Ad pixels connected in HubSpot come with it, and enquiries can reach the CRM through the site's signed form webhook.

Overview

This integration connects Foundation CMS with HubSpot. Foundation CMS is Swarm Labs' multi-tenant content management system on Cloudflare Workers. It holds a site's content and hands it to the site as whole, typed records, and every site runs as its own Worker with its own database and media bucket. HubSpot is switched on per site by entering the Hub ID from HubSpot's account menu. The site draws HubSpot's tracking code itself, so no script is pasted into the CMS.

Business Context and Core Use Case

For a marketing team that lives in HubSpot, the website is where contacts are first seen. They want page visits on the contact record, ad audiences built from site traffic, and every enquiry in the CRM, without the site showing two cookie banners or counting each visit twice. Foundation CMS handles the first two natively and makes the third a short automation.

The Applications Involved

Foundation CMS (Foundation CMS) holds the account ID, loads HubSpot's code after consent, passes the visitor's choice on, and delivers form submissions.

HubSpot (HubSpot) tracks visits, runs the ad pixels connected in it, and holds the contacts.

How the Integration Works

With the account ID set, HubSpot's tracking code loads after a visitor accepts marketing cookies, and the site tells HubSpot that answer, so HubSpot's own banner stays off and the visitor is asked once. Ad pixels connected in HubSpot, such as Google Ads or LinkedIn, load with it under the same consent; in that case the site's own Google Ads and LinkedIn settings stay empty, or every visit is counted twice. For enquiries, the form's signed webhook sends each submission to n8n or Zapier, which creates or updates the HubSpot contact.

Immediate Operational Value

One consent decision, one banner, one set of pixels, and the contact record shows the visitor's journey. The double-counting trap many sites fall into, with the same pixel loaded by the site and by HubSpot, is called out in the settings themselves.

Security, Access, and Governance

Foundation CMS sites carry a privacy box that every visitor sees until they decide. Essential cookies are always on; analytics and marketing tags load only after a yes, and turning the box off means no optional scripts at all. The form webhook is signed over its timestamp and body, so the receiving workflow can reject anything that did not come from the site, and a captured request cannot be replayed later. Every delivery attempt is recorded, so whether an enquiry reached HubSpot is always answerable.

Summary

Enter a Hub ID and a Foundation CMS site feeds HubSpot its visits and ad audiences behind a single privacy box, while the signed form webhook carries enquiries into the CRM.

Frequently asked questions

Will visitors see two cookie banners?

No. The site's privacy box asks once and tells HubSpot the answer, so HubSpot's own banner stays off on the site.

Should I also set Google Ads and LinkedIn on the site?

Not if HubSpot already carries those pixels. Leave the site's settings empty, or every visit is counted twice.

How do enquiries reach the HubSpot CRM?

Through the form's signed webhook to n8n or Zapier, which creates or updates the contact. HubSpot's form API expects a richer body than the direct REST call from Foundation CMS sends.

Can I see whether a submission was delivered?

Yes. Every delivery attempt is recorded with the host it reached and the result.

Want Foundation CMS and HubSpot
wired up for you?