Skip to content

Commit 6a6ac17

Browse files
deminothgatsbybot
and
gatsbybot
authored
fix(gatsby-plugin-google-analytics): Separate preconnect and dns-prefetch (#25279)
Co-authored-by: gatsbybot <[email protected]>
1 parent f08687c commit 6a6ac17

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/gatsby-plugin-google-analytics/src/gatsby-ssr.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ export const onRenderBody = (
3434
// Lighthouse recommends pre-connecting to google analytics
3535
setHeadComponents([
3636
<link
37-
rel="preconnect dns-prefetch"
37+
rel="preconnect"
3838
key="preconnect-google-analytics"
3939
href="https://www.google-analytics.com"
4040
/>,
41+
<link
42+
rel="dns-prefetch"
43+
key="dns-prefetch-google-analytics"
44+
href="https://www.google-analytics.com"
45+
/>,
4146
])
4247

4348
const excludeGAPaths = []

0 commit comments

Comments
 (0)