From 113f10a6e1115d815f7e01f39a3492e5c3136cc9 Mon Sep 17 00:00:00 2001 From: crander7 Date: Thu, 23 Feb 2023 13:12:11 -0700 Subject: [PATCH] fixed --- src/gatsby-ssr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gatsby-ssr.js b/src/gatsby-ssr.js index c9d5973..0ae4a99 100644 --- a/src/gatsby-ssr.js +++ b/src/gatsby-ssr.js @@ -3,7 +3,7 @@ import { isDefined, oneline } from './utils'; import defaultOptions from './default-options'; export function onRenderBody({ setPostBodyComponents }, pluginOptions) { - const { productionOnly, respectDNT, trackingCode } = Object.assign( + const { productionOnly, respectDNT, trackingCode, businessUnitId } = Object.assign( {}, defaultOptions, pluginOptions @@ -23,7 +23,7 @@ export function onRenderBody({ setPostBodyComponents }, pluginOptions) { key={`gatsby-plugin-hubspot`} async defer - src={`//js.hs-scripts.com/${trackingCode}.js`} + src={`//js.hs-scripts.com/${trackingCode}.js${businessUnitId ? `?businessUnitId=${businessUnitId}` : ''}`} dangerouslySetInnerHTML={{ __html: oneline` var _hsq = window._hsq = window._hsq || [];