Skip to content

Commit

Permalink
Merge pull request #18 from julien1619/patch-1
Browse files Browse the repository at this point in the history
Fix missing tracking code in rendered HTML
  • Loading branch information
kremalicious authored Jun 13, 2019
2 parents 57092e5 + 12a3464 commit d5338b2
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,10 @@ exports.onRenderBody = (
(process.env.NODE_ENV === 'production' || pluginOptions.dev === true) &&
!isPathExcluded
) {
return (
setHeadComponents([buildHead(pluginOptions)]) &&
setPostBodyComponents([
buildTrackingCode(pluginOptions),
buildTrackingCodeNoJs(pluginOptions, pathname)
])
)
setHeadComponents([buildHead(pluginOptions)])
setPostBodyComponents([
buildTrackingCode(pluginOptions),
buildTrackingCodeNoJs(pluginOptions, pathname)
])
}
return null
}

0 comments on commit d5338b2

Please sign in to comment.