gatsby-plugin-google-analytics sets tracking code in the body
See original GitHub issueThe google analytics plugin sets the tracking code in the <body />
here.
Any reasons for this? I’d like to move it to <head />
because Google Webmasters tools requires that “tracking code should be in the <head />
section of your page,” when verifying the property.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
gatsby-plugin-google-analytics
This plugin uses Google's analytics.js file under the hood. ... options: { // The property ID; the tracking code won't be generated without...
Read more >How to add Google analytics in Gatsby - Mario Kandut
Install the official Google analytics plugin gatsby-plugin-google-gtag OR; Add the tracking code to customized html.js.
Read more >Gatsby and Google Analytics - Aman Kumar
Put gatsby-plugin-google-analytics in your gatsby plugins. ... By setting it to false, it will be placed in the <body>. ... Check the tracking...
Read more >How to Add multiple Tracking ID for Google Analytics in ...
I already have one tracking code in my gatsby.config.js file like so { resolve: "gatsby-plugin-google-analytics", options: { trackingId: "UA- ...
Read more >Gatsby Google Analytics 4.0 | Step-by-Step Guide Using Gtag ...
1. Create a Google Analytics 4.0 account and property · 2. Generate a measurement ID · 3. Install Gatsby Google Analytics plugin Gtag...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Even with the merged PR (https://github.com/gatsbyjs/gatsby/pull/3995), the script is still being added to the end of the body for me.
The head component never gets the script.
Any ideas on what I’m doing wrong here?
Sweet… Just been speaking to @endymion1818 and he wants to take a shot at implementing this 😃