This plugin puts so much of code in the header when seen the source code but the GA code is missing. What is going on?
My website is https://kunalparihar.in
]]>Why you don’t use “Analytics” section in AMP plugin settings to add your Google Analytics?
Also you could try to add it correct via php code:
https://amp.dev/documentation/components/amp-analytics/
https://amp-wp.org/documentation/getting-started/analytics/
Don’t use dirty solutions.
I hope it helps.
As @nikitasp mentioned you can use the Analytics feature of the plugin or use Site Kit to place your snippet on your AMP URLs. From inspecting your site now I can see valid Analytics snippet on your AMP URLS so it looks like you’ve since managed to configure it correctly.
This plugin puts so much of code in the header when seen the source code but the GA code is missing. What is going on?
To improve performance and keep in line with AMP principles the plugin inlines all CSS after performing CSS treeshaking, which is why you may notice this addition code. If this wasn’t performed there would be more network requests for each stylesheet.
We have some FAQs on the plugins website if you’d like to know more about how the plugin works.
Let me know if you have any other queries in relation to the above and we’d be happy to help.
]]>