Rules

Secret ingredients to quality software

Edit
Info

Do you include Google Analytics in your website?

Created on 20 Aug 2014 | Last updated by Tiago Araújo [SSW] on 01 Apr 2021 08:56 PM (17 days ago)

Google Analytics gives you a great insight into how, when and where your website is used. If you're not using an analytics package in your website, you're flying blind when it comes to understanding how, when and where your website is used.

By using Google Analytics, you will be able to see what your visitors are viewing and what they aren't, what they spend large amount's of time on, what pages are causing errors, what pages are directing visitors to you, which browsers and devices are being used to see you site and more. All this information help you better structure your site to what your visitors like. It also allows you to compare site traffic from one month to another.

The most useful reports:

  • Which are your most popular pages of your website
  • Which sites are referring the most hits to you
  • Which keywords are bringing users to your site
  • If you have downloads, which are the most popular

To add Google Analytics to your website:

  1. Log into your Google account,
  2. Go to Admin ,
  3. Ensure both Account and Property
  4. Specify your website details,
  5. Find your Tracking Code,
  6. And add the script to your website

![Figure: Navigate to the Tracking Code property](20-08-2014-3-25-06-PM-compressor (1).png)

From this page, you will be able to get a JavaScript snippet to include in your application.

20 08 2014 3 30 55 PM compressor
Figure: Include this JavaScript in your web application

20 08 2014 10 53 15 AM compressor
Figure: The JavaScript code in HTML

Once deployed, this script will start tracking metrics and interacting with Google Analytics.

You are good to go!

Drew RobsonDrew Robson
Adam CoganAdam Cogan
Tiago AraujoTiago Araujo

We open source. This page is on GitHub