From 6ad98c6259b69be699247c617873d6102125899e Mon Sep 17 00:00:00 2001 From: Dave Nichols Date: Thu, 31 Oct 2024 18:07:18 +0000 Subject: [PATCH] Added Hubspot tracking code to all pages. --- scripts/delayed.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/delayed.js b/scripts/delayed.js index 65fe3c0..ce3f5de 100644 --- a/scripts/delayed.js +++ b/scripts/delayed.js @@ -47,6 +47,19 @@ if ( const attrsFa = JSON.parse('{"data-site": "TSVSBXOE"}'); loadScript('https://cdn.usefathom.com/script.js', attrsFa); +// HubSpot Tracking Code +function loadHsScript() { + const hsScriptEl = document.createElement('script'); + hsScriptEl.type = 'text/javascript'; + hsScriptEl.async = true; + hsScriptEl.defer = true; + hsScriptEl.setAttribute('id', 'hs-script-loader'); + hsScriptEl.src = '//js.hs-scripts.com/1769030.js'; + document.querySelector('head').append(hsScriptEl); +} +loadHsScript(); + +// HubSpot Form Code function loadHubSpot() { const hsScriptEl = document.createElement('script'); hsScriptEl.type = 'text/javascript';