Show Menu
Cheatography

Google Analytics Cheat Sheet (DRAFT) by

A list of Regular Expression functionality supported by Google Analytics - Cheat Sheet Description

This is a draft cheat sheet. It is a work in progress and is not finished yet.

RegExp - Anchors

^
Start of line
$
End of line

RegExp | Character Classes

\s
White space character
\S
Non-white space character
\d
Digit character
\D
Non-digit character
\w
Word
\W
Non-word (e.g. punctu­­ation, spaces)

RegExp | Meta Ch­ar (must be esc.)

^
[
]
$
(
)
.
{
}
*
+
?
\
|
-

RegExp | GA Filter group accessors

$Ax
Access group x in field A (e.g. $A1)
$Bx
Access group x in field B (e.g. $B1)

GUA | URL Collect Parameters - Main Parameters

a
Random number used to link Google Analytics to Adsense (currently not working)
#
cid
Client ID number
*
de
Document Encoding type
dl
The Document Location
dt
Document Title
fl
FLash version
je
Java Enabled? (1=yes, 0=no)
ni
Non-In­­te­r­a­ction hit type (set as true or '1' in code. Shows as 1 or 0 in parame­­ters)
_s
hit Sequence - increments each time an event (inc pageview)
sd
Screen Depth
sr
Screen Resolution
t
the Type of tracking call this is (e.g. pageview, event)
*
tid
Tracking ID (your UA number)
*
_u
Verifi­­cation code generated by GA analyt­­ics.js
+
ul
User Language code
_v
SDK Version number
v
protocol Version
*
vp
View Port size (browser window visible area)
z
cache buster
# equivalent of the classic analytics utmhid parameter
* must be present on EVERY call to be accepted by GA servers.
+ see http:/­­/s­t­a­ck­­ove­­rf­l­o­w.c­­om­­/q­u­e­st­­ion­­s/­2­6­84­­904­­2/­u­-­pa­­ram­­et­e­r­-i­­n-u­­ni­v­e­rs­­al-­­go­o­g­le­­-an­­al­y­t­ic­­s-c­­ol­l­e­ct­­-hits for full explan­­ation
 

RegExp - Quanti­­fiers

*
Zero or more (greedy)
*?
Zero or more (lazy)
+
One or more (greedy)
+?
One or more (lazy)
?
Zero or one (greedy)
??
Zero or one (lazy)
{X}
Exactly X (e.g. 3)
{X,}
X or more, (e.g. 3)
{X, Y}
Between X and Y (e.g. 3 and 5) (lazy)

GUA - Events Parameters

ea
Event Action
ec
Event Category
el
Event Category
ev
Event Value
You will only see any of these when t (type) = event

GUA - Timing Parameters

utc
User Timing Catergory (not universal coordi­­nated time)
utv
User Timing Variable name
utt
User Timing Time
utl
User Timing Label
plt
Page Load Time
dns
DNS time
pdt
Page Download Time
rrt
Redirect Response Time
tcp
TCP connect time
srt
Server Response Time
exd
EXception Descri­­ption
exf
is EXception Fatal?

GUA - Campaign Variable Parameters

cn
Campaign Name
cs
Campaign Source
cm
Campaign Medium
ck
Campaign Keyword
cc
Campaign Content
ci
Campaign Id
glcid
Google adwords ID
dclid
google Display ads ID
To register any campaign variables (c*) you MUST populate Campaign Source AND Campaign Medium as a minimum.

GUA - Custom Parameters

cd1...cdN
Custom Dimension value with index number (free=1 to 20, premium=1 to 200)
cm1...cmN
Custom Metric value with index number (free=1 to 20, premium=1 to 200)
cg1...cgN
Content Grouping value with index number (1 to 5)

GUA - Override Parameters

dh
Document Host name override
dp
Document Path - used when overriding the standard page name
ua
User Agent override
uip
User IP override
cd
sCreen name - mainly used in app tracking
linkid
Link ID of a clicked DOM element
 

RegExp | Ranges and Groups

.
Any character
(a|b)
a or b (case sensitive)
(...)
Group, e.g. (keyword)
(?:...)
Passive group, e.g. (?:key­­word)
[abc]
Range (a or b or c)
[^abc]
Negative range (not a or b or c)
[A-Z]
Uppercase letter between A and Z
[a-z]
Lowercase letter between a and z
[0-7]
Digit between 0 and 7

RegExp | Sample Patterns

^/di­r­ec­­tor­­y/(.*)
Any page URLs starting with /direc­­tory/

(bra­n­d­­\s*?­­term)
Brand term with or without whitespace between words

br­and­­\s+[cf]
Key phrases beginning with 'brand' and the second word not starting with c or f

\.as­px$
URLs ending in '.aspx'

ORDE­R­\-­­\d{6}
"­OR­­DER­­-" followed by a six digit ID

(?:­\?­|&­)u­­tm=­­([­^­&$­]+)
Value of 'utm' querys­­tring parameter
Note: Sample Patterns Text - Descri­ption

GUA - eCommerce Parameters

cu
CUrrency that the transa­­ction takes place in
in
Item Name
ic
Item Code (sku)
ip
Item Price (per unit)
iq
Item Quantity
iv
Item Variation (normally category)
ta
Transa­­ction Affili­­ation
ti
Transa­­ction Identi­­fi­c­ation number
tr
Transa­­ction Revenue value
ts
Transa­­ction Shipping value
tt
Transa­­ction Tax value
You will only see these when t (Type) = transa­­ction or item.

GUA - App Tracking Parameters

aid
Applic­­ation ID
aiid
Applic­­ation Installer ID
an
Applic­­ation Name
av
Applic­­ation Version
ht
HiT sequence number

GUA - Other Parameters

aip
Anonymize IP (see note below)
jid
JoinID (binding your GA cookie to Double­­Click cookie)
qt
Queue Time (for collecting offline data)
sc
Session Control
uid
User ID (known uid as opposed to cid)
aip: The value of this parameter can be absolutely anything to cause the IP to be anonym­­ized. This includes a blank value. $aip=, $aip=0, &aip=1 will all cause anonymity.

GUA - Google Experi­­ments Parameters

xid
Experiment ID
xvar
Experiment VARiant

GUA - Social Tracking Parameters

sn
Social Network
sa
Social Action
st
Social action Targt (normally a url)