Google Analytics (ga)

About

What is a Analytics Application? from Google

ga() is tracking snippet. It's implemented as a javascript global function known as the command queue

Error handling

If the ga() command queue receives a command it doesn't recognize, it simply ignores it, making calls to the ga() function very safe, as they will almost never result in an error.

Management

Create a tracker

Google Analytics - Tracker

Client Id

If a cookie does not exist for the specified domain, a client ID is generated and stored in the cookie

Command

https://developers.google.com/analytics/devguides/collection/analyticsjs/command-queue-reference

Test / Debugging

Plugin

  • Autotrack Plugin with outboundLinkTracker - Automatically tracks link clicks to external domains.

Structure

In google analytics, an Organization has several account:

  • that have several Properties (web site)
  • that may be composed of several Views

When you associate a site with a property, clicking a link to Google Analytics from Search Console will take you to that property’s default view.

Hierarchy of organizations, accounts, users, properties, and views

Documentation / Reference

Task Runner