1
0
mirror of https://github.com/kremalicious/gatsby-plugin-matomo.git synced 2025-01-03 10:25:00 +01:00

Merge pull request #18 from julien1619/patch-1

Fix missing tracking code in rendered HTML
This commit is contained in:
Matthias Kretschmann 2019-06-13 21:03:50 +02:00 committed by GitHub
commit d5338b206f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,13 +85,10 @@ exports.onRenderBody = (
(process.env.NODE_ENV === 'production' || pluginOptions.dev === true) &&
!isPathExcluded
) {
return (
setHeadComponents([buildHead(pluginOptions)]) &&
setHeadComponents([buildHead(pluginOptions)])
setPostBodyComponents([
buildTrackingCode(pluginOptions),
buildTrackingCodeNoJs(pluginOptions, pathname)
])
)
}
return null
}