Skip to content

Commit 46f15ae

Browse files
authored
VAP10-40: Adding HubSpot Tracker
1 parent 600305f commit 46f15ae

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

fern/custom.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,26 @@ function configurePostHog() {
9393

9494
}
9595

96+
function initializeHubSpot() {
97+
98+
if (isLocalhost) {
99+
console.log('[custom.js] Skipping HubSpot configuration on localhost');
100+
return;
101+
}
102+
103+
var hubSpotScript = document.createElement("script");
104+
hubSpotScript.type = "text/javascript";
105+
hubSpotScript.id = "hs-script-loader";
106+
hubSpotScript.src = "https://js-na2.hs-scripts.com/244349038.js";
107+
hubSpotScript.async = true;
108+
hubSpotScript.defer = true;
109+
document.getElementsByTagName('head')[0].appendChild(hubSpotScript);
110+
}
111+
96112
function initializeAll() {
97113
initializeHockeyStack();
98114
initializeReo();
115+
initializeHubSpot();
99116
configurePostHog();
100117
if (ENABLE_VOICE_WIDGET) {
101118
injectVapiWidget();

0 commit comments

Comments
 (0)