APIs & Integrations

PKim23
Member

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hello all, I am having some issues with an embeded form on an WP page which doesn't seem to display on Firefox browsers.

 

After the recent update on Firefox, embeded hsform is filtered as a Tracking Content and form does not load.

PKim23_0-1718822132227.png

 

Only Firefox browser reproduces the issue as other browsers does not treat the embeded form as a tracking content. I understand this may be due to Enhance Tracking Protection setting on the browser, but I am curious see if there are different solutions.

 

Sample Embeded codes snippet:

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script>
hbspt.forms.create({
region: "#region",
portalId: "#portalId",
formId: "#formId"
});
</script>

Please provide feedback, insight, solutions.

_________________
Edit (06-21-2024)

Now works on normal browser setting on Firefox, however is still blocked on private browsing. Tested on Chrome & Edge, the form is not triggered as a tracking content.

4 Accepted solutions
RHmelnutskyi
Solution
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

When Enhanced Tracking Protection is enabled in Firefox, it blocks requests to `hsforms.net`, causing the `hbspt.forms.create` JavaScript not to work. This will result in users seeing an empty form on websites. You can view an example of this problem by checking the link and using the slider under the image to see how the form appears with and without Firefox Tracking Protection: https://scanningfox.com/r/gwHsL.

 

To address this, you can modify the embedded script. Before calling `hbspt.forms.create()`, insert the following code:

 

if (typeof hbspt === 'undefined') {
document.write('<p>The form is blocked by Firefox Enhanced Tracking Protection. Please email me directly at <a href="mailto:test@gmail.com">email</a></p>');
}"

 

So at least user will see some content.

View solution in original post

FvB
Solution
Contributor

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hubl directly places the form as a <form> tag, so that script didn't work in my particular use case. In case somebody else runs into the same issue later: I solved this by requesting the hsforms tracking gif, and unhiding a warning text if the request fails. In code:

 

 

<div class="form_tracking_error hidden">
	<p>The Enhanced Tracking Protection settings on your browser might interfere with this download form. If the download isn't starting, set the Enhanced Tracking Protection settings to "standard" and try again.</p>
</div>
<div class="form_display">
	{% form
		form_to_use="{{ module.popup_contents.field_group.form_field.form_id }}"
		response_response_type="{{ module.popup_contents.field_group.form_field.response_type }}"
		response_message="{{ module.popup_contents.field_group.form_field.message }}"
		response_redirect_id="{{ module.popup_contents.field_group.form_field.redirect_id }}"
		response_redirect_url="{{module.popup_contents.field_group.form_field.redirect_url}}"
	%}
</div>
<script>
	function whenNoTrackingProtection() {
		// keeping track of the version of the script, to ensure test pages are up to date
		let version = "1.5" 
		if (!whenNoTrackingProtection.promise) {
			whenNoTrackingProtection.promise = new Promise(function(resolve, reject) {
				var time = Date.now();
				var img = new Image();
				img.onload = resolve;
				img.onerror = function() {
					if ((Date.now() - time) < 100) {
						reject(new Error("Rejected."));
					} else {
						resolve(new Error("Takes too long."));
					}
				};
				img.src='https://forms-na1.hsforms.com/embed/v3/counters.gif';
			}).then((result) => {
				console.log("Tracking " + version + " OK");
			}).catch(e => {
				console.log("Tracking " + version + " blocked: " + e);
				document.querySelector(".{{ name }} .form_tracking_error").classList.remove("hidden");
															 });
		}
	}
	whenNoTrackingProtection()
</script>

 

View solution in original post

BérangèreL
Solution
Community Manager
Community Manager

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hi @svnwa and thank you so much for your detailed feedback and for sharing your experience with our embedded v4 forms and strict browser privacy settings on the HubSpot Community.

We absolutely recognize the growing importance of privacy and security for B2B clients, and we understand how frustrating it can be when critical interactions like form submissions are disrupted.
 

While I can’t share a specific timeline yet, please feel free to submit the HubSpot Developer feedback form or I can submit it for you if you'd like.
 

Thank you again for raising this and for helping make our platform better for everyone.

And please let me know if there is anything else I can help with. I'll be delighted to do so!
 

Thanks,
Bérangère





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




View solution in original post

0 Upvotes
insiteful
Solution
Contributor

Embeded Form treated as Tracking Content on Firefox

SOLVE

This same issue (default browser-based tracking prevention settings blocking HubSpot Forms from loading) now also affects other browsers like Microsoft Edge and Safari.

 

Below is a simple script (<3kb, open source, and vanilla JS only) we created to detect when tracking prevention is blocking your HubSpot forms from loading and alerts visitors with step-by-step instructions (specific to each browser) to fix the problem. Here's how it looks: 

 

hubspot-forms-tracking-prevention-fix-1536x832

 

This script is open source and maintained here on Github, so feel free to submit any issues or pull requests.

 

More details and installation instructions here.

 

<script> // Detect HubSpot forms blocked by browser tracking prevention (Edge, Firefox, Safari)
// Built by Insiteful.co (C) Copyright 2025 Insiteful
// MIT License: https://opensource.org/license/mit
(function() {
  // Check if browser is Edge, Firefox, or Safari
  function getBrowser() {
    const isEdge = /Edg/.test(navigator.userAgent);
    const isFirefox = /Firefox/.test(navigator.userAgent);
    const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
    return { isEdge, isFirefox, isSafari, any: isEdge || isFirefox || isSafari };
  }

  // Check if tracking prevention is likely enabled
  function isTrackingPreventionEnabled() {
    if (!navigator.cookieEnabled) {
      return true;
    }
    
    // Check for Do Not Track
    if (navigator.doNotTrack === "1" || window.doNotTrack === "1") {
      return true;
    }
    
    // Check storage access (strict mode blocks this)
    try {
      localStorage.setItem('test', 'test');
      localStorage.removeItem('test');
    } catch (e) {
      return true;
    }
    
    return false;
  }

  // Check if HubSpot is blocked
  function isHubSpotBlocked() {
    if (typeof window.HubSpotConversations === 'undefined' && 
        typeof window.hbspt === 'undefined') {
      return true;
    }
    return false;
  }

  // Run checks
  function checkAndAlert() {
    const browser = getBrowser();
    const trackingPrevention = isTrackingPreventionEnabled();
    const hubspotBlocked = isHubSpotBlocked();

    if (browser.any && (trackingPrevention || hubspotBlocked)) {
      let browserName = '';
      let instructions = '';
      
      if (browser.isEdge) {
        browserName = 'Microsoft Edge';
        instructions = '1. Click the lock icon in the address bar\n' +
                      '2. Turn off "Tracking prevention" for this site\n' +
                      '3. Refresh the page';
      } else if (browser.isFirefox) {
        browserName = 'Firefox';
        instructions = '1. Click the shield icon in the address bar\n' +
                      '2. Turn off "Enhanced Tracking Protection" for this site\n' +
                      '3. Refresh the page';
      } else if (browser.isSafari) {
        browserName = 'Safari';
        instructions = '1. Go to Safari > Settings (or Preferences)\n' +
                      '2. Click on Privacy\n' +
                      '3. Uncheck "Prevent cross-site tracking"\n' +
                      '4. Refresh the page';
      }
      
      alert(
        '⚠️ Tracking Prevention Detected\n\n' +
        `It appears you are using ${browserName} with strict tracking prevention enabled, ` +
        'which may be blocking HubSpot forms and other features.\n\n' +
        'To ensure full functionality, please:\n' +
        instructions
      );
    }
  }

  // Wait for HubSpot to load (or fail to load)
  setTimeout(checkAndAlert, 2000);
})();</script>

 

View solution in original post

0 Upvotes
19 Replies 19
svnwa
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hi everyone,

 

we’ve run into a problem with the new v4 forms on our website. The issue is not only happening in Firefox (with Enhanced Tracking Protection set to strict) but also in Microsoft Edge when Tracking Prevention is set to “Strict”.

Since we’re in a B2B context, many of our clients and their companies have stricter security policies by default, so this isn’t just an edge case. It affects a bigger number of customers or potential customers trying to submit forms on our websites.

 

Right now, we’ve implemented a workaround similar to the one described in this thread. Basically we detect when the form can’t load and display a fallback message telling users to try another setting, browser, or device. It works, but obviously it’s not a great user experience.

 

It would be really helpful if Hubspot could rethink how v4 forms are implemented. For example, if the form scripts and assets could be served from our connected domain (so they appear as first-party), they wouldn’t be blocked by strict tracking protection. Also Hubspot could provide a lightweight, cookieless embed that just renders the form, without trying to load anything from tracker domains. That alone would potentially prevent most of the blocking issues in Firefox/Edge Strict, because the browsers would have no reason to block the form script.

 

Is this something on HubSpot’s radar, or are there any plans to support a more reliable embed option for stricter browser settings?

insiteful
Contributor

Embeded Form treated as Tracking Content on Firefox

SOLVE

Unfortunately HubSpot doesn't have much control over this, but here's a simple workaround to detect when your forms are blocked (so your visitors get some kind of error message instead of thinking your website is broken): https://community.hubspot.com/t5/APIs-Integrations/Embeded-Form-treated-as-Tracking-Content-on-Firef...

0 Upvotes
BérangèreL
Solution
Community Manager
Community Manager

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hi @svnwa and thank you so much for your detailed feedback and for sharing your experience with our embedded v4 forms and strict browser privacy settings on the HubSpot Community.

We absolutely recognize the growing importance of privacy and security for B2B clients, and we understand how frustrating it can be when critical interactions like form submissions are disrupted.
 

While I can’t share a specific timeline yet, please feel free to submit the HubSpot Developer feedback form or I can submit it for you if you'd like.
 

Thank you again for raising this and for helping make our platform better for everyone.

And please let me know if there is anything else I can help with. I'll be delighted to do so!
 

Thanks,
Bérangère





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




0 Upvotes
RHmelnutskyi
Solution
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

When Enhanced Tracking Protection is enabled in Firefox, it blocks requests to `hsforms.net`, causing the `hbspt.forms.create` JavaScript not to work. This will result in users seeing an empty form on websites. You can view an example of this problem by checking the link and using the slider under the image to see how the form appears with and without Firefox Tracking Protection: https://scanningfox.com/r/gwHsL.

 

To address this, you can modify the embedded script. Before calling `hbspt.forms.create()`, insert the following code:

 

if (typeof hbspt === 'undefined') {
document.write('<p>The form is blocked by Firefox Enhanced Tracking Protection. Please email me directly at <a href="mailto:test@gmail.com">email</a></p>');
}"

 

So at least user will see some content.

FvB
Contributor

Embeded Form treated as Tracking Content on Firefox

SOLVE

Is it possible to adapt this script to work with hubl form integrations? Like this one:

{% form
	form_to_use="{{ module.popup_contents.field_group.form_field.form_id }}"
	response_response_type="{{ module.popup_contents.field_group.form_field.response_type }}"
	response_message="{{ module.popup_contents.field_group.form_field.message }}"
	response_redirect_id="{{ module.popup_contents.field_group.form_field.redirect_id }}"
	response_redirect_url="{{module.popup_contents.field_group.form_field.redirect_url}}"
%}

 Thanks in advance!

0 Upvotes
RHmelnutskyi
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hi.

Honestly, I didn't work with HubSpot templating system, but my guess {% form ... %} will be translated into <script>insert form</script>.

So you'll need another script tag after form. The result will look something like:

 

{% form
	form_to_use="{{ module.popup_contents.field_group.form_field.form_id }}"
	response_response_type="{{ module.popup_contents.field_group.form_field.response_type }}"
	response_message="{{ module.popup_contents.field_group.form_field.message }}"
	response_redirect_id="{{ module.popup_contents.field_group.form_field.redirect_id }}"
	response_redirect_url="{{module.popup_contents.field_group.form_field.redirect_url}}"
%}
<script>
if (typeof hbspt === 'undefined') {
  document.write('<p>The form is blocked by Firefox Enhanced Tracking Protection. Please email me directly at <a href="mailto:test@gmail.com">email</a></p>');
}
</script>

 

FvB
Solution
Contributor

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hubl directly places the form as a <form> tag, so that script didn't work in my particular use case. In case somebody else runs into the same issue later: I solved this by requesting the hsforms tracking gif, and unhiding a warning text if the request fails. In code:

 

 

<div class="form_tracking_error hidden">
	<p>The Enhanced Tracking Protection settings on your browser might interfere with this download form. If the download isn't starting, set the Enhanced Tracking Protection settings to "standard" and try again.</p>
</div>
<div class="form_display">
	{% form
		form_to_use="{{ module.popup_contents.field_group.form_field.form_id }}"
		response_response_type="{{ module.popup_contents.field_group.form_field.response_type }}"
		response_message="{{ module.popup_contents.field_group.form_field.message }}"
		response_redirect_id="{{ module.popup_contents.field_group.form_field.redirect_id }}"
		response_redirect_url="{{module.popup_contents.field_group.form_field.redirect_url}}"
	%}
</div>
<script>
	function whenNoTrackingProtection() {
		// keeping track of the version of the script, to ensure test pages are up to date
		let version = "1.5" 
		if (!whenNoTrackingProtection.promise) {
			whenNoTrackingProtection.promise = new Promise(function(resolve, reject) {
				var time = Date.now();
				var img = new Image();
				img.onload = resolve;
				img.onerror = function() {
					if ((Date.now() - time) < 100) {
						reject(new Error("Rejected."));
					} else {
						resolve(new Error("Takes too long."));
					}
				};
				img.src='https://forms-na1.hsforms.com/embed/v3/counters.gif';
			}).then((result) => {
				console.log("Tracking " + version + " OK");
			}).catch(e => {
				console.log("Tracking " + version + " blocked: " + e);
				document.querySelector(".{{ name }} .form_tracking_error").classList.remove("hidden");
															 });
		}
	}
	whenNoTrackingProtection()
</script>

 

insiteful
Solution
Contributor

Embeded Form treated as Tracking Content on Firefox

SOLVE

This same issue (default browser-based tracking prevention settings blocking HubSpot Forms from loading) now also affects other browsers like Microsoft Edge and Safari.

 

Below is a simple script (<3kb, open source, and vanilla JS only) we created to detect when tracking prevention is blocking your HubSpot forms from loading and alerts visitors with step-by-step instructions (specific to each browser) to fix the problem. Here's how it looks: 

 

hubspot-forms-tracking-prevention-fix-1536x832

 

This script is open source and maintained here on Github, so feel free to submit any issues or pull requests.

 

More details and installation instructions here.

 

<script> // Detect HubSpot forms blocked by browser tracking prevention (Edge, Firefox, Safari)
// Built by Insiteful.co (C) Copyright 2025 Insiteful
// MIT License: https://opensource.org/license/mit
(function() {
  // Check if browser is Edge, Firefox, or Safari
  function getBrowser() {
    const isEdge = /Edg/.test(navigator.userAgent);
    const isFirefox = /Firefox/.test(navigator.userAgent);
    const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
    return { isEdge, isFirefox, isSafari, any: isEdge || isFirefox || isSafari };
  }

  // Check if tracking prevention is likely enabled
  function isTrackingPreventionEnabled() {
    if (!navigator.cookieEnabled) {
      return true;
    }
    
    // Check for Do Not Track
    if (navigator.doNotTrack === "1" || window.doNotTrack === "1") {
      return true;
    }
    
    // Check storage access (strict mode blocks this)
    try {
      localStorage.setItem('test', 'test');
      localStorage.removeItem('test');
    } catch (e) {
      return true;
    }
    
    return false;
  }

  // Check if HubSpot is blocked
  function isHubSpotBlocked() {
    if (typeof window.HubSpotConversations === 'undefined' && 
        typeof window.hbspt === 'undefined') {
      return true;
    }
    return false;
  }

  // Run checks
  function checkAndAlert() {
    const browser = getBrowser();
    const trackingPrevention = isTrackingPreventionEnabled();
    const hubspotBlocked = isHubSpotBlocked();

    if (browser.any && (trackingPrevention || hubspotBlocked)) {
      let browserName = '';
      let instructions = '';
      
      if (browser.isEdge) {
        browserName = 'Microsoft Edge';
        instructions = '1. Click the lock icon in the address bar\n' +
                      '2. Turn off "Tracking prevention" for this site\n' +
                      '3. Refresh the page';
      } else if (browser.isFirefox) {
        browserName = 'Firefox';
        instructions = '1. Click the shield icon in the address bar\n' +
                      '2. Turn off "Enhanced Tracking Protection" for this site\n' +
                      '3. Refresh the page';
      } else if (browser.isSafari) {
        browserName = 'Safari';
        instructions = '1. Go to Safari > Settings (or Preferences)\n' +
                      '2. Click on Privacy\n' +
                      '3. Uncheck "Prevent cross-site tracking"\n' +
                      '4. Refresh the page';
      }
      
      alert(
        '⚠️ Tracking Prevention Detected\n\n' +
        `It appears you are using ${browserName} with strict tracking prevention enabled, ` +
        'which may be blocking HubSpot forms and other features.\n\n' +
        'To ensure full functionality, please:\n' +
        instructions
      );
    }
  }

  // Wait for HubSpot to load (or fail to load)
  setTimeout(checkAndAlert, 2000);
})();</script>

 

0 Upvotes
PKim23
Member

Embeded Form treated as Tracking Content on Firefox

SOLVE

Curious to know how this was accepted as the solution, as this seems like a short-term solution. Is Hubspot planning to implment something to resolve this permanently?

Sbrac
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

I can't see how this is meant to be a Accepted Solution when this is a work around. HubSpot need to find a fix for this and get it cleared from the Tracking aspects because it's poor UX for someone to click an email when you want them to submit a form.

tko
Contributor

Embeded Form treated as Tracking Content on Firefox

SOLVE

We have noticed that this problem also affects our pages. It should actually affect every website on which a Hubspot form is integrated and all Firefox users.
Has anyone found a solution?

Ryan_Johnston
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

We have the same issue with HubSpot forms not loading on an AEM powered website. Is there any response from HubSpot devs on when this might be resolved?

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hey, @PKim23 I did some research internally. Unfortunately, this is out of our control, as this is a Firefox setting. Because this is tied to settings in the browser, there is not a workaround I can offer apart from of making sure this is disabled in the browser settings. Outside of this, I'd recommend filing a support ticket and letting your CSM or CSM team know this is blocking and impacting your business. 

 

Best,

Jaycee

 





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




Sbrac
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

Is there a way that you can reach out to Firefox directly and see why the Hubspot form is being flagged for this? I feel like this is a huge problem for Hubspot as a company that their content is being blocked by browsers and impacting your customers.

0 Upvotes
BHomberg
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

Thanks a lot for your investigation, Jaycee. 👍

 

Is there maybe a chance for the wordpress plugin to show the blocked users a message like: "Form couldn't loaded, please enable 3rd Party cookies or try a different browser"

 

Sbrac
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

It would be great to know how to fix this because this is becoming a real problem for my company too!

BHomberg
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

Same Problem on our Account. All Forms work fine in Wordpress with Chrome Browsers, but Firefox users dont see any Form.

 

Only if you switch in Firefox to "Default Secuirty" - (dont block 3rd Party Cookies), then it works

PKim23
Member

Embeded Form treated as Tracking Content on Firefox

SOLVE

Hi @Jaycee_Lewis, wanted reach out to see if this issue is something that can be resolved? If not please let me know!

BHomberg
Participant

Embeded Form treated as Tracking Content on Firefox

SOLVE

We have latest Version of Wordpress and Hubspot Plugin, but the issue still remain. The Firefox Browser has no Addons installed.

0 Upvotes