Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
crander7 committed Feb 23, 2023
1 parent 3b4bb57 commit 113f10a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 || [];
Expand Down

0 comments on commit 113f10a

Please sign in to comment.