Is there a way to ensure that a HubSpot form is still displayed when users have strict privacy or tracking settings enabled?
I believe the form has been implemented correctly, as we are able to collect leads successfully. However, the form is not displayed when browser privacy settings are set to strict. Ideally, we would like to offer a user-friendly experience where users with stricter privacy settings can still view and use the form as intended.
On the left screenshot: Mozilla Firefox with Strict privacy settings (not working)
On the right screenshot: Microsoft Edge with Balanced privacy settings (working)
Thanks for raising this — forms disappearing under strict privacy settings is a tricky (and increasingly common) challenge.
I’d like to bring a few Community members into the conversation who are familiar with HubSpot forms, privacy/tracking behavior, and browser restrictions. @franksteiner79@Gaurav_Aggarwal@Ben_M — hope you’re all having a great week! Have you seen cases where HubSpot forms fail to render when browsers are set to strict privacy/tracking modes (like Firefox Strict)? Any guidance on what’s technically possible here, known limitations, or best practices to ensure forms still display while remaining privacy-compliant?
Appreciate any insights you can share.
Best,
Victor
Four our websites, we’ve opted for a pragmatic approach. We have modified the embed code like this:
<script charset=“utf-8” type=“text/javascript” src=“//js-eu1.hsforms.net/forms/embed/v2.js”></script>
<script>
if (typeof hbspt === ‘undefined’) {
document.write(‘<p>This form is being blocked by strict privacy settings in your browser.</p>’);
};
hbspt.forms.create({
portalId: “xxxxx”,
formId: “xxxxx”,
region: “xxx”
});
</script>
Not the best solution, but at least people with strict settings see something instead of nothing and can decide whether to lower their settings for a moment (ok, unlikely, but they might).
Using the script you shared, I was able to build a workaround (still changing some details): if the embedded HubSpot form is blocked by strict privacy/tracking settings, a CTA-style fallback appears with a mailto link instead.
<!-- CTA-style fallback -->
<div id=“hubspot-fallback” class=“cta-fallback” style=“display:none;”>
<div class=“cta-fallback__inner”>
<div class=“cta-fallback__text”>
<div class=“cta-fallback__title”>Can’t see the contact form?</div>
<div class=“cta-fallback__subtitle”>
Your browser may be blocking it due to strict privacy/tracking settings. You can email us instead.
</div>
</div>
<a id=“hs-fallback-mail” class=“cta-fallback__button” href=“#”>
Email us
</a>
</div>
</div>
<style>
/* CTA band */
.cta-fallback{
margin-top: 18px;
background: #a8cb7c;
padding: 18px 0;
}
var mailLink = document.getElementById(“hs-fallback-mail”);
if (mailLink) mailLink.href = mailto;
// If HubSpot is blocked, show fallback
if (typeof window.hbspt === “undefined”) {
document.getElementById(“hubspot-fallback”).style.display = “block”;
return;
}
// Otherwise render the form
hbspt.forms.create({
portalId: “YOUR_PORTAL_ID”,
formId: “YOUR_FORM_ID”,
region: “eu1”,
target: “hubspot-form”
});
})();
</script>