Skip to content

Commit 9c5440c

Browse files
authored
chore: defer core metrics script (#914)
* chore: defer core metrics script * fix: remove async
1 parent a641620 commit 9c5440c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gatsby-ssr.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
export const onRenderBody = ({ setHeadComponents }) => {
3+
export const onRenderBody = ({ setPostBodyComponents }) => {
44
if (process.env.NODE_ENV !== `production`) {
55
return null;
66
}
@@ -24,10 +24,10 @@ export const onRenderBody = ({ setHeadComponents }) => {
2424
},
2525
}`;
2626

27-
return setHeadComponents([
27+
return setPostBodyComponents([
2828
<script key="digital-data" dangerouslySetInnerHTML={{ __html: script }} />,
2929
<script
30-
async="async"
30+
defer
3131
key="core-metrics"
3232
src="https://1.www.s81c.com/common/stats/ibm-common.js"
3333
type="text/javascript"

0 commit comments

Comments
 (0)