Hi,
we have created a custom email template within Emailify (has Hubspot integration). Using the API, we got the HTML into Hubspot’s Design Manager, where we can see the clean code, without any added scripts from Hubspot.
When we create a new email in Marketing → New Email and select our prepared HTML as the template, we get these scripts inserted into the code, which mail-tester.com marks as dangerous elements that reduce deliverability.
<!-- Start of HubSpot Analytics Code Not Loaded -->
<script>
(function(){
const timeoutEvent = document.createEvent(‘CustomEvent’);
timeoutEvent.initCustomEvent(“content-analytics-code-not-loaded”, true, true, { detail: “Not loaded in preview mode” });
window.dispatchEvent(timeoutEvent);
})();
</script>
<!-- End of HubSpot Analytics Code Not Loaded -->
<script type=“text/javascript”>
var hsVars = {
render_id: “c97d5811-aa1c-4f39-997a-1a281b586782”,
ticks: 1743838403954,
page_id: 224839680240,
content_group_id: 0,
portal_id: 143763891,
app_hs_base_url: “https://app-eu1.hubspot.com”,
cp_hs_base_url: “https://cp-eu1.hubspot.com”,
language: “cs”,
analytics_page_type: “email”,
scp_content_type: “”,
analytics_page_id: “224839680240”,
category_id: 2,
folder_id: 0,
is_hubspot_user: false
}
</script>
<script defer src=“https://static.hsappstatic.net/HubspotToolsMenu/static-1.432/js/index.js”></script>
At the same time, if we build an email directly in Hubspot from their modules, these scripts are not inserted there.
Does anyone have experience with this and know why this happens or how to prevent it please? Does it really affect deliverability? We have failed to send out the email (the reason may be the database we have from the client and we are checking its quality) and would like to rule out this possibility. At the same time one of the scripts is javascript, which should not be in the emails at all..
Thank you very much for your experience.
