How to Integrate Google Analytics With Custom PHP website

A good website administrator obtains data on his website and seeks way to improve user experience on the website. One of the ways to achieve this is through Google Analytics (GA). Google Analytics provides a means to monitor the traffic in your website. It will allow you to get figures such as how many visitors leave right away and how much time people spend on average browsing your pages. It helps you understand what users do on your website and how much traffic your site receives. There are both free and pro versions of Google Analytics. But the free version serves well for most people.

There are 3 ways of intergrating Google Analytics on your WordPress site:

  • Use a theme that supports integration with GA – not th best option as you may need to change themes
  • Add code snippets to your site – best option, especially for sites that have been coded
  • Use plug-ins – the easiest and most efficient. Offers extra features as well eg displaying analytics data right on your WP dashboard

Integrating Google Analytics using code snippets

  1. Access Google Analytics Homepage and register for an account if you don’t have one already.
  2. Enter the details requested for such as name of the account and site URL as well as the other details
  3. Next, a tracking ID will be provided together with a Google Analytics tracking code – which is a javascript. Copy the script on everypage of your custom html/php website that you would wish to track.

 

 

 

 

 

 

To view the reports on various pages, go to the Home Page for the summary reports or access Reports. You can get vaious types of reports such as real time, audience, conversion etc

Was this article helpful?

Related Articles

Leave A Comment?