Google analytics code in wordpress header. After installing and activating the plugin go to settings insert headers and footers and place the code into the plugins settings. Manually add the code to the functionsphp file. Add google analytics code to wordpress header with a plugin you can add the raw tracking code to your sites header with the insert headers and footers plugin.
Once youve located and selected headerphp paste the google analytics tracking code right before the head tag in the editor. Manually add the code to the headerphp file. Editing the headerphp file in wordpress then make sure to click on the update filebutton.
There are several ways of accomplishing this but i will not go into this method. Add google analytics to wordpress. Then you can follow the instructions step by step until you successfully integrate it with your site.
After that you will see two boxes for adding code to header and footer. The reason is that every time you perform a theme or core update you will lose your analytics code. Wordpress install google analytics in the header 3 manually inserting the code in the head tags inside the headerphp file.
Google analytics tracking code is now being added to wordpress. In order for google analytics to start tracking your visitors the code above needs to be present on every page of your site you want to do that on. Once done dont forget to click the save button to store your changes.
All good so far. Usually thats all of them. After you installed and activated monsterinsights you can easily add your tracking code into your header by clicking on the authenticate it with your google account button by navigating to insights settings in your wordpress dashboard.
Simply paste the code in one of the two boxes. Then lets get down to how to add google analytics to your wordpress site now.