Skip to content

Commit

Permalink
Merge pull request #331 from hlxsites/330-hubspot-tracking-code
Browse files Browse the repository at this point in the history
330-hubspot-tracking-code
  • Loading branch information
davenichols-DHLS authored Oct 31, 2024
2 parents 0556256 + 6ad98c6 commit b59e8bc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/delayed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit b59e8bc

Please sign in to comment.