Log in to your WordPress dashboard and navigate to Appearance » Theme Editor. Now click the Theme Header (header. php) file on the right-hand side below the Theme Files section. Paste the tracking code you just copied from your Analytics profile before the closing /head tag.
How do I add Google Analytics code to my website?
Get started with Analytics
- Create or sign in to your Analytics account: Go to google.com/analytics.
- Set up a property in your Analytics account.
- Set up a reporting view in your property.
- Follow the instructions to add the tracking code to your websiteso you can collect data in your Analytics property.
How do I add a tracking code to my WordPress site?
Adding Tracking Code Options
- You can use Insert Headers and Footers plugin, and the first step is to install it on the website.
- Once you activate the plugin go to Settings >> Insert Headers and Footers.
- From there, just add your code to the Scripts in the Header Box.
Where Google Analytics code should be placed?
As per Google Analytics’ instructions, your tracking code should always be placed just after the opening of thetag of the website.
Do I need to put Google Analytics code on every page?
You do need to put Google Analytics on every page that you are interested in tracking. Depending on what website builder you are using, it is done automatically for you.
Where do I put Google Analytics on my WordPress site?
Upon activation, you need to visit Settings » Insert Headers and Footers page. Here you need to paste the Google Analytics tracking code that you copied earlier into the ‘Scripts in headers’ section. Don’t forget to click on the save changes button to store your settings.
Can you use Google Analytics on a WordPress website?
Adding Google Analytics to a WordPress.com site or blog is available as a feature of the WordPress.com Premium, Business, and eCommerce plans. Visit My Sites → Tools → Marketing → Traffic to enable Google Analytics.
Where should Google Analytics tracking code be placed in the HTML of a webpage to collect data?
The Analytics tracking code should be placed Just before the closing tag of your website in the HTML of a webpage for data collection.