An idiot’s guide to Google Analytics

So you’ve heard of Google Analytics, but you don’t really understand what it is, or how it works?

Matt Lane
Matt Lane
Oct 8, 2014 · 4 min read

What is Google Analytics?

Google Analytics is a free tool that lets you monitor and analyse website traffic. It is the most widely used website statistics service globally (In 2009, 50% of websites contained some kind of traffic analysis tool. Of that 50%, 80% were using Google Analytics).

How does Google Analytics work?

Google Analytics works via a “page tag”. The page tag is called the “Google Analytics Tracking Code”, and it is a snippet of JavaScript code.

<script>
THIS IS THE SCRIPT
</script>
<!DOCTYPE html>
<html>
WEBSITE WEBSITE WEBSITE
WEBSITE WEBSITE WEBSITE
WEBSITE WEBSITE WEBSITE
WEBSITE WEBSITE WEBSITE
</html>
<!DOCTYPE html>
<html>
WEBSITE WEBSITE WEBSITE
<script>
THIS IS THE SCRIPT
</script>

WEBSITE WEBSITE WEBSITE
WEBSITE WEBSITE WEBSITE
WEBSITE WEBSITE WEBSITE
</html>
Image for post
Image for post

How can I tell if a website is using Google Analytics?

As mentioned above Google Analytics is included via a page tag. You can view the source code of any webpage on the World Wide Web using your browser. Once you are looking at the source code of a webpage, you can check for the Google Analytics code.

  1. View the source code of the webpage by pressing Ctrl + U
  2. Search the source code by pressing Ctrl + F for “analytics.js” or “ga.js” or “googletagmanager.com”

Can I view the analytics for the website?

Access to the analytics being collected for any particular website is limited to those who have login access to the Google Analytics account.

What data does Google Analytics collect?

Google Analytics can collect a lot of data about how people use a website. At its most basic, it will collect:

  • Referring site details (such as the URI a user came through to arrive at this site)
  • Type of web browser
  • Type of operating system (OS)
  • Flash version, JavaScript support, screen resolution, and screen color processing ability
  • Network location and IP address.
  • clicks on links leading to external websites
  • errors when users fill out forms
  • clicks on videos
  • scroll depth
  • interactions with site-specific widgets.
  • telephone conversations
  • Point of sale transactions
  • RFID or NFC sensor activity
  • a whole lot of stuff that no one has thought of yet.

Privacy

Google Analytics Terms of Service prohibits the collection of personally identifiable data such as name, email address, or billing information.

Assigning user IDs and cross device measurement

While you cannot collect personally identifiable data in Google Analytics, you can assign IDs (perhaps a customer ID) to multiple sessions across multiple devices.

Image for post
Image for post
From Justin Cutroni: “The User-ID value must originate from your systems. It must eventually appear in the tracking code on your site or in your app. The User-ID will then be sent to Google Analytics with each data hit.” Image from http://cutroni.com/blog/2014/04/10/understanding-cross-device-measurement-and-the-user-id/

How can I stop Google Analytics collecting data about my activity?

If you want to stop websites collecting website usage data about you via Google Analytics, you can:

  1. disable Javascript in your browser
  2. use Google’s Opt-out browser add-on
  3. use a third-party tool such as Disconnect, Ghostery or Do No Track Me

How can I start tracking users on my website?

Google Analytics is free to use. All you need are:

  1. a website to track (and the ability to add the Javascript snippet to that website)


Google Analytics tips and tricks

Some article (I plan to add more) for mixed skill levels…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store