If you have a WordPress website and want to monitor traffic and statistics of your site, sure you asked yourself: How I can install Google Analytics on my website? Where do I install the code? Are there plug-ins for WordPress Google Analytics? In this post I will explain how to install Google Analytics on your website in two different ways, simple either a little more advanced:
With WordPress Plug-ins for Google Analytics
You can use WordPress plug-ins to install Google Analytics on your site quickly and easily, without having to know HTML code. You just need to have a Google Analytics account for your website and have on hand the UA code that gives us the tool. In most cases, simply enter this code and you’re done.
It’s quick to set up and do not need to be an expert. Simply, you enter the UA code or synchronize your website with your Google Analytics account.
Here are most recommended WordPress plug-ins:
1.Simple Google Analytics
This plug-in has a very simple configuration and you’ll do it in less than a minute. Simply you enter Google Analytics ID or UA code and you have it running. It allows you to track all data on your websites and offers you the possibility to measure the speed of loading, recording external links and downloads demographic reports and interests, etc.
2. Google Analytics by Yoast
Created by Joost de Valk, author of the acclaimed SEO Yoast plug-in, this plug-in allows you to quickly sync your website or blog with your Google account to start recording traffic data. You can also do this manually by entering the UA code of your site. Once installed and activated in Settings you can adjust a number of advanced options, such as track outbound links and downloads, type download files to track, activate the universal tracking, enable demographic and interest reports, monitor sub-domains, debug mode etc. You also have a Dashboard where you can view analytical reports within the site administration panel. And with excellent quality seal option Yoast Team.
With Google Analyticator, as in the previous case, you can synchronize your website with your Google account and access a Dashboard progress in that monitor your traffic data and various settings such as tracking outbound links with enhanced functionality, downloads for downloaded file types; obtain reports from remarketing, demographics and interests, etc. Also, you have even the ability to track the statistics of your account Google Adsense entering the ID. If you do not want to use the internal Dashboard functionality to your WordPress dashboard you can choose to make a simple crawl the site to view statistics on Google Analytics panel by typing the UA code, as in the previous case.
Advanced Mode (HTML code within the <head>)
In the case of WordPress, it is a PHP-based language system and pages are built dynamically, i.e., to create each page tool takes portions of code from different files and thus builds them intelligently. Typically the site files, there is one called header.php which includes all the HTML code to be added to all pages of the site so that they all have the same header.
Therefore, to implement the Google Analytics code Simply login to the editing panel and then go to WordPress header.php file, which you find in the top around the HTML code of the site header: <head> <meta> <title>, etc. Here you have to do is paste the code of Google Analytics in a line that is between the <head> and </ head>. Once you’ve done this, Google Analytics you can start to track the statistics of your website.
1.Access to the Editing of Files WordPress
To access the area where you can edit your files please go to Appearance> Editor’s main menu on your WordPress Dashboard.
2.Locate the file header.php
On the right side of this section, you have a list of all the files you can edit in your theme or template. Search and click the header.php file so that all code is displayed in the central area.
3.Locate the <head> and </ head> and enter the code
Search within the code the <head> and </ head> and anywhere between the two labels hit enter to open a new line. Then paste the code provided to you by Google Analytics for manual installation of the tracking functionality your website or blog. Once you’ve pasted the code, click on the Update file located in the bottom left button. Now you have run Google Analytics tracking for your site.
How to Put Google Analytics Code into Your Web Site
Google Analytics code or tracking code you get entering your Google Analytics account. Then you have to click on the Admin tab, and in the first column (Account) select the website for which you want to get the tracking data.
Once selected the website (you can have several websites tracked with Google Analytics), you go to the second column (property), and you click on Tracking Information.
Later in the drop – down, you click on Tracking Code. Install Google Analytics on WordPress
Once inside this section, the tool shows you a code to enter between the <head> and </ head> of your website.