Skip to content
Zwetan Kjukov edited this page Feb 8, 2019 · 4 revisions

Getting started with Google Universal Analytics

for ActionScript 3.0 / Adobe Flash / Adobe AIR / RedTamarin

An overview of tracking with Google Analytics.

Account

You need a Google Analytics account to be able to use the Measurement Protocol.

Inside this account you will be able to create properties, and for each properties you will obtain a Tracking ID.

You can not test / debug / use the Measurement Protocol without such Tracking ID.

The Tracking ID (also known as Web Property ID) use the following format: UA-XXXX-Y.

Properties

When you create new property you will have to chose from

  • a Website Property
  • a Mobile app Property

In general, you want to use a Website Property.

Use the library to send any kind of Hit types ('pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing') to the Web property, you will find all the data in the reports view.

See New Property Behaviour for the details.
See Old Property Behaviour for the deprecated behaviour.

First Tracking

You have a property setup, and a Tracking ID UA-XXXX-Y, time to send some datas.

Tracking with Flash Player plugin
For when you want to track from a SWF file.

Tracking with AIR
For when you want to track from an AIR application.

Tracking with Redtamarin
For when you want to track from the command line.

Now that you know the basic, it's about what you want to track:
pages ? screens ? events ? errors ? timing ?

Tracking Configuration
Tracking Details and Tricks

We will try to put specialised documentations but you can simply follow any good documentation, for example Google Analytics Help.

Limits and Quotas

You simply can not track anything and everything forever, first it would be useless and second you will hit much faster the hard limits.

It is useless to track everything just for the sake of it or just because you can.

No, you should have a plan, analytics stand for analysing data from past and present to reveal informations, insights, trends, behaviours, etc.

For example, you may decide to automate the tracking of all your app events like the Event.ENTER_FRAME ... here what gonna happen if you do something reckless like that:

  • you will burn trough your quotas in no-time
  • then as per Google policy you will be contacted to use the paid premium options
  • and if you don't react you will have your account simply disconnected
  • no more free tracking for you

Think about what you want to track and why.

Let's say we have a game, would it not be smarter to track:

  • when a player starts a level
  • how long he/she spent on this level
  • when the level is won or lost
  • how many times the user click the help button
  • unusual crashes
  • etc.

Instead of tracking every single click the player made in the game ?

See those very good examples:
Replica Island - Tuning With Metrics Redux
Replica Island - Player Metrics Analysis

Be smart, check Google Analytics Collection Limits and Quotas

  • 10 million hits per month per property
  • 200,000 hits per user per day
  • 500 hits per session
    not including ecommerce (item and transaction hit types)

Tracking is not Spying

We can not enforce it but we heavily advise you to follow Google Analytics Policy
see Measurement Protocol / SDK / User ID Policy

most importantly

You will not upload any data that allows Google to personally identify an individual (such as certain names, Social Security Numbers, email addresses, or any similar data), or data that permanently identifies a particular device (such as a unique device identifier if such an identifier cannot be reset), even in hashed form.

and

If you upload any data that allows Google to personally identify an individual, your Google Analytics account can be terminated, and you may lose your Google Analytics data.

Useful Links

Google Analytics Developers

Google Analytics Help

Analytics for Web (analytics.js)

Analytics for Android

Stack Overflow: google-analytics

Measurement Protocol Developer Group

Measurement Protocol Issues Tracker