How to Test Google Analytics on Localhost

We will explain you step by step guide how to test google analytics tool on your localhost pc or laptop. Are you a web analyst or a webmaster or a developer and looking for google analytics solutions. SoniSEO provides you wide range of how to tips on Google analytics and other web analytics tools.

Here is the step by Step Tips how to use google analytics on localhost

Step 1 Signup for Google Analytics if already signed up login to your google analytics account.

Step 2 Create New Account and property in Google Analytics and give name whatever you want.

Step 3 Now the enter main part of your analytics localhost default URL. This default URL will be your localhost IP.

If you are not aware of your localhost IP. You can find it in your PCs’s – C Drive >> Windows>> System32 >> Drivers >> ETC >> hosts

Open this hosts file and check IP now access this IP in your web browser. Is your localhost website accesible by this IP? example http://127.0.0.1/demowebsite/. This IP setting may differs depends on IIS or Apache. Now note this IP

Step 4 Create default view and get tracking code

Step 5 Edit tracking code and set it in auto mode Example – ga(‘create’, ‘UA-xxxxxx-x’, ‘auto’);

Step 6 Now put this tracking code in your localhost website’s <head> </head> section.

Now your localhost website is ready for reporting.

  • 4
    Shares

3 Comments

  1. Gaurav Sharma December 12, 2014
  2. Utkarsh Bhatt March 9, 2017
    • Lars May 5, 2017

Leave a Reply