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.
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.
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.
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>');
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>
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>');
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>
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?
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.
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?
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?
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
Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success. Don't miss this opportunity to connect and grow—reserve your spot today!
Did you know that the Community is available in other languages? Join regional conversations by changing your language settings !
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.
Jun 28, 20249:13 AM - edited Jun 28, 202411:07 AM
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"