google analytics -...

49

Upload: ngotuyen

Post on 04-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Google Analytics: End To End Nick Mihailovski May 20, 2010

View live notes and ask questions about this session on Google Wave http://bit.ly/c8zpAV

4

Interpret

Extend

Integrate

Google Analytics Web Interface

5

Google Analytics Web Interface

6

Google Analytics Web Interface

7

Four Components

8

Collection Export

Management

Processing

9

1. Core Processing

Dimensions and Metrics

10 Google Confidential

Dimensions Metrics

Lots of Data – How Is It Calculated?

11 Google Confidential

ga:pagePath

ga:keyword

ga:referralPath

ga:browser

ga:city

ga:continent

ga:visits

ga:pageviews

ga:uniquePageviews

ga:timeOnPage

ga:timeOnSite

95 Metrics 80 Dimensions

Management

Tracking

1. Logs

Collection Processing Export

4. Functions

5. Tables

2. Goals, Filters, Profile Settings

3. Data Structure

Web Interface Data Export Feed

6. Query Engine

Web Interface Account Feed

Core Visitor Interaction Model

13

Visitor Session Hit

Data Collection From Client

14

<ga.js>

1x1 pixel image request

__utm.gif?... GA

Visitor Model Persists Across Requests

15

Visitor Session Hit

__utm.gif?utmac=UA-1-5&vid=1020&cmp=google&type=page&path=/foo

__utm.gif?utmac=UA-1-5&vid=1020&cmp=google&type=page&path=/bar

__utm.gif?utmac=UA-1-5&vid=1020&cmp=google&type=trans&rev=100

__utm.gif?utmac=UA-1-5&vid=1020&cmp=google&type=path&path=/foo

__utm.gif?utmac=UA-1-5&vid=1020&cmp=referral&type=page&path=/bar

__utm.gif?utmac=UA-1-5&vid=1020&cmp=referral&type=page&path=/baz

Functions Process Sessions And Hits

16

String dimension(Session session, int index) { ...}int metric(Session session, int index) { ...}

Logs Session

: Hits

0 1 2 3 , , ,

Calculating Metrics – ga:visits

17

int visits(Session session, int index) { if (index == 0) { return 1; } return 0;}

page

/foo.html

trans

ID=1135

page

/bar.html

page /foo.html

0 1 2 3

Calculating Dimensions – ga:pagePath

18

String pagePath(Session session, int index) { if (session.hit[index].type == "page”) { return session.hit[index].pagePath; } return "";}

page /foo.html

trans

ID=1135

page /bar.html

page /foo.html

0 1 2 3

View live notes and ask questions about this session on Google Wave http://bit.ly/c8zpAV

20

2. Developer Platform

Developer Platform

21

Data Fields

Protocol

Client Libraries

Account Management

Data Export Data Collection

Data Collection Overview

22

JavaScript (ga.js)

Andriod SDK

iPhone SDK

Mobile Websites - PHP/JSP/ASP/Perl

ActionScript 3 - Flash/Flex/Air

Silverlight

Client Libraries Protocol

__utm.gif

Data Types

Page Tracking

Event Tracking

Custom Variables

E-Commerce

IP-Geo/Network

System Parameters

Account Management Overview

23

Accounts

Web Properties

Profiles

Goals

Advanced Segments

Data Types

Google Data

Protocol

Java

JavaScript

Python

.Net (C#)

Ruby

Perl

PHP

Client Libraries

Data Export API Overview

Dimensions

Metrics

Data Types

Google Data

Queries:

•  Dimensions

•  Metrics

•  Date Range

•  Advanced Segments

•  Filters

•  Sorting

•  Max Rows

Protocol

Java

JavaScript

Python

.Net (C#)

Ruby

Perl

PHP

Client Libraries

View live notes and ask questions about this session on Google Wave http://bit.ly/c8zpAV

26

3. Example Integration

Using Visitor Behavior To

Optimize User Experience

27

Ranking a List Of Links By Number Of Clicks

List of Unordered Links

28

Order Links Using Data

29 Google Confidential

Design Overview

30

Google Analytics

3. Order links by # of clicks

Content Management Webpage Database

Display links on page

1. Track clicks on links Send IDs to GA

2. Export clicks on links export data by ID

Design Overview

31

Content Management Webpage Database

Display links on page

CMS Displays Links On Page

32

html_links

linkId

linkUrl

linkText

SELECT A.linkId, A.linkUrl, A.linkTextFROM html_links AS A

<ul> <li> <a name=“linkId” href=“linkUrl”> linkText</a> </li> ...</ul>

Database Content Management SQL

Website HTML

33

Design Overview

34

Google Analytics

Content Management Webpage Database

Display links on page

1. Track clicks on links Send IDs to GA

Track Clicks On Links With Google Analytics

35

<ul> <li> <a name=“linkId” href=“linkUrl”> linkText</a> </li> ...</ul>

HTML

1.  Implement Tracking Code

2.  Set linkId in Custom Variable

3. Send Data with Event Tracking

JavaScript

36

Code Example Implement Tracking Code

Design Overview

37

Google Analytics

Content Management Webpage Database

Display links on page

2. Export clicks on links export data by ID

2-Step Scheduled Data Export

38

DB App GA

1. Scheduled Process

Server Client

2. Served On Demand

DB

Query The Right Data

39

query.setFilters("ga:customVarName1==top-links");query.setDimensions("ga:customVarValue1");query.setMetrics("ga:totalEvents");

_gaq.push(['_setCustomVar', 1, ‘top-links’, linkId, 3]);_gaq.push(['_trackEvent', enclosingId, linkText]);

Tracking Code

Data Export API Query

40

Code Example Sending data into Google Analytics

Design Overview

41

Google Analytics

3. Order links by # of clicks

Content Management Webpage Database

Display links on page

Order Links By Number Of Clicks

42

html_links

linkId

linkUrl

linkText

Data Base Content Management

link_order

linkId

totalEvents

, link_order AS BWHERE A.linkId=B.linkIdORDER BY B.totalEvents

SELECT A.linkName, A.linkUrl, A.linkTextFROM html_links AS A

43

44

Developer Eco System

www.google.com/analytics/apps

45

46 Google Confidential

Evolve!

View live notes and ask questions about this session on Google Wave http://bit.ly/c8zpAV

Learn More

Google Analytics Code Site:

http://www.code.google.com/apis/analytics

48 Google Confidential