-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-ssr.js
42 lines (40 loc) · 1.21 KB
/
gatsby-ssr.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React from "react"
export const onRenderBody = (
{ setHeadComponents, setPostBodyComponents },
pluginOptions
) => {
if (process.env.NODE_ENV === "production") {
setHeadComponents([
<script
src="https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js"
type="text/javascript"
charSet="UTF-8"
data-domain-script="833401ed-6965-4b06-a80b-9282226ea246"
></script>,
<script type="text/javascript">function OptanonWrapper() {}</script>,
])
}
if (process.env.NODE_ENV === "production") {
setPostBodyComponents([
<script
type="text/javascript"
id="hs-script-loader"
async
defer
src="//js.hs-scripts.com/6690555.js"
></script>,
<script
async
type="text/javascript"
dangerouslySetInnerHTML={{
__html: `
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "522dpqi9tb");`,
}}
/>,
])
}
}