Skip to content

Commit

Permalink
fix(gatsby-plugin-google-analytics): Separate preconnect and dns-pref…
Browse files Browse the repository at this point in the history
…etch (#25279)

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
  • Loading branch information
deminoth and gatsbybot committed Jul 3, 2020
1 parent f08687c commit 6a6ac17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/gatsby-plugin-google-analytics/src/gatsby-ssr.js
Expand Up @@ -34,10 +34,15 @@ export const onRenderBody = (
// Lighthouse recommends pre-connecting to google analytics
setHeadComponents([
<link
rel="preconnect dns-prefetch"
rel="preconnect"
key="preconnect-google-analytics"
href="https://www.google-analytics.com"
/>,
<link
rel="dns-prefetch"
key="dns-prefetch-google-analytics"
href="https://www.google-analytics.com"
/>,
])

const excludeGAPaths = []
Expand Down

0 comments on commit 6a6ac17

Please sign in to comment.