Google Analytics

Share on facebook
Share on twitter
Share on reddit
Share on linkedin
Share on pinterest
Share on email
QuestionsCategory: General QuestionsGoogle Analytics
Keith Keenan asked 11 months ago

How do I install my gtag.js code into my header??

4 Answers
0
Jeremiah
answered 11 months ago

There are a few ways to do this. Often your SEO plugin will handle this for you. You just need to add your Analytics ID to your SEO plugin. SEOPress does it, I think Yoast no longer does. Also there are dedicated Analytics plugins, like Monster Insights.

You can use your functions.php to hook into the header and add the code, or more easily use a plugin to do the technical stuff for you. Insert Headers and Footers is a good one: https://wordpress.org/plugins/insert-headers-and-footers/

Keith Keenan answered 11 months ago

Thanks once again for the great info!
 

0
Naman Modi
answered 11 months ago

To install the global tracking snippet, copy the following code and paste it immediately after the tag on every page of your site. Replace GA_TRACKING_ID with the tracking ID of the Google Analytics property to which you want to send data. You need only one global snippet per page.

0
Naman Modi
answered 11 months ago

To install the global tracking snippet, copy the following code and paste it immediately after the tag on every page of your site. Replace GA_TRACKING_ID with the tracking ID of the Google Analytics property to which you want to send data. You need only one global snippet per page.