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:
commit
d5338b206f
@ -85,13 +85,10 @@ exports.onRenderBody = (
|
|||||||
(process.env.NODE_ENV === 'production' || pluginOptions.dev === true) &&
|
(process.env.NODE_ENV === 'production' || pluginOptions.dev === true) &&
|
||||||
!isPathExcluded
|
!isPathExcluded
|
||||||
) {
|
) {
|
||||||
return (
|
setHeadComponents([buildHead(pluginOptions)])
|
||||||
setHeadComponents([buildHead(pluginOptions)]) &&
|
setPostBodyComponents([
|
||||||
setPostBodyComponents([
|
buildTrackingCode(pluginOptions),
|
||||||
buildTrackingCode(pluginOptions),
|
buildTrackingCodeNoJs(pluginOptions, pathname)
|
||||||
buildTrackingCodeNoJs(pluginOptions, pathname)
|
])
|
||||||
])
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
return null
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user