Googleanalytics startpadv2-090409122023-phpapp01

55
Or…Confessions of a Google Analytics Junkie Loren Bast Founder, Bellusi LLC

description

 

Transcript of Googleanalytics startpadv2-090409122023-phpapp01

Page 1: Googleanalytics startpadv2-090409122023-phpapp01

Or…Confessions of a Google Analytics Junkie

Loren BastFounder, Bellusi LLC

Page 2: Googleanalytics startpadv2-090409122023-phpapp01

Who this is for, what I’ll coverWho this is for

Regular GA users – not complete newbies Not afraid to monkey with Javascript

Don’t be afraid to ask questions!

What I’ll coverVarious hacks, little-known or understood

features, etc. Not a feature-by-feature walkthrough

Designed to give you ideas, not be an exact roadmap for things you should do Can easily fall into the trap of “give a boy a hammer…”

Page 3: Googleanalytics startpadv2-090409122023-phpapp01

On the agendaSetupProfiles and FiltersTracking User SegmentsEvent TrackingA/B TestingGoals & EcommerceOther Tracking ToolsOther ResourcesQ&A

Page 4: Googleanalytics startpadv2-090409122023-phpapp01

To considerThere are two basic visitors to your site

HumansBots

Keep this in mind throughout the presentation

Page 5: Googleanalytics startpadv2-090409122023-phpapp01

Ensuring Correct Installation

Page 6: Googleanalytics startpadv2-090409122023-phpapp01

Setup & InstallationEnsure your script installation is correct

Use ga.js (new in late 2007) instead of urchin.js Urchin is being phased out; new GA features aren’t available for

it

Are all your pages tagged?Check Traffic Sources/Referring Sites

Are your own site pages coming up with high page counts? You may have problems – untagged pages are linking to tagged ones Tag not installed properly Page load issues – the tag doesn’t get called consistently

Until this is fixed – your clickpath analysis, entrances/exits, etc., will be skewed

Page 7: Googleanalytics startpadv2-090409122023-phpapp01

Your domain as high referrer

Page 1(tracked)

Page 3(tracked)

Page 2(untracked)

What GA tracks• 1 Exit• (Possibly 1 bounce)• 1 Less Pageview• Any user campaigns are lost – session is over!

What GA tracks• 1 Entrance (from a referring domain – yours!)• Possibly 1 bounce, if user leaves after this page)

Page 8: Googleanalytics startpadv2-090409122023-phpapp01

Referring Sites

Page 9: Googleanalytics startpadv2-090409122023-phpapp01
Page 10: Googleanalytics startpadv2-090409122023-phpapp01

ProfilesProfiles provide different views of data

Have multiple sites? Track them using different profiles under one

account

Have multiple distinct areas of one site? Subdomains, subfolders, etc. Use profiles to make analysis easier

Want to track different data on the same site? Set up profiles as if you’re tracking two distinct

domains (Hack #1)

Page 11: Googleanalytics startpadv2-090409122023-phpapp01

Tracking one site, different dataUseful as a “sandbox”

Create a new profile as if you were going to track a different domain, but enter in the same domain

Create new variables for multiple scripts var pageTracker = _gat._getTracker(“UA-<accountID>-1”); pageTracker._trackPageview(); var pageTracker2 = _gat._getTracker("UA-<accountID>-2"); pageTracker2._trackPageview(<different data>);

What do you mean, <different data>?

Page 12: Googleanalytics startpadv2-090409122023-phpapp01

Before we go on…Skim the Google Analytics Tracking API

http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html

A handful of calls are useful, but the one we care about most (right now) is: _trackPageview(opt_pageURL) Allows you to specify the URL (or data) that Google

Analytics records, not the actual page URL (Hack #2) For example: pageTracker._trackPageview(“I_like_marshmallows”

)

Page 13: Googleanalytics startpadv2-090409122023-phpapp01

• The page URL– http://foodsite.com/Recipes/Meat-and-Poultry/Chicken/Main.aspx– pageTracker._trackPageview();

• What you want Google to track in your sandbox profile– http://foodsite.com/FoodCategoryPage– pageTracker2._trackPageview(“/FoodCategoryPage”);

Tracking different data

Page 14: Googleanalytics startpadv2-090409122023-phpapp01

Profile FiltersProfile filters

Discard data you don’t care about Data that is filtered out is PERMANENTLY deleted from that profile Therefore, create one completely unfiltered, raw profile to keep

complete data records Name it such that people know not to use it unless they know

what it’s for (ie, “Danger – Raw Data!”)

What data should you discard? Anything that: Makes analysis harder Shouldn’t be seen by certain users Examples:

Corporate IP addresses (internal traffic), subdomains or subfolders with pages that don’t interact much with each other, etc.

Page 15: Googleanalytics startpadv2-090409122023-phpapp01

Profile filtersAggregate data to canonicalize your pages

Make Google think that many individual pages show up as one…so… These pages: www.yourdomain.com/page.php?ref=1 www.yourdomain.com/page.php?ref=2 www.yourdomain.com/page.php?ref=3 Are really one page www.yourdomain.com/page.php

Filter out the “ref” tag, and Google Analytics will treat the three pages as one

Page 16: Googleanalytics startpadv2-090409122023-phpapp01

Now: a word about SEOReal world example of how to use the hacks

When you’re creating filters for you…think about your visiting bots They don’t know that “ref” in querystrings should be

filtered out, so… www.yourdomain.com/page.php?ref=1 www.yourdomain.com/page.php?ref=2 www.yourdomain.com/page.php?ref=3

Are still 3 distinct pages to them (with diluted “link juice”)*

* Standard SEO caveats apply: should the pages be crawled in the first place? Are those URLs only generated by “humans”, not bots? Etc., etc.

Page 17: Googleanalytics startpadv2-090409122023-phpapp01

Canonical fixesReal world example, cont’d

Google has worried about this…and in Feb 2009, came out with a fix – canonical tagging http://www.mattcutts.com/blog/canonical-link-tag/ Put this tag in your header on pages that need it:

<link rel="canonical" href="http://yourdomain.com/page.php"/>

Track it using: One of your “sandbox” GA accounts (hack #1) pageTracker2._trackPageview(<canonical_URL>)

(hack #2)

Page 18: Googleanalytics startpadv2-090409122023-phpapp01

One last word about profilesProfiles can be used for much more than analytics

Example – to give your partners, customers, vendors reporting on only “their” portion of your site

Page 19: Googleanalytics startpadv2-090409122023-phpapp01
Page 20: Googleanalytics startpadv2-090409122023-phpapp01

User SegmentsTwo types of segmentation

Session based (“who visited from the last email newsletter?”)

Cookie based (“what do ‘registered’ users do on their repeat visits to the site?”)

Page 21: Googleanalytics startpadv2-090409122023-phpapp01

Session basedSingle visit tracking

Tracking visitors from emails, banner ads, URL shorteners (for Tweeting, etc.)

Let’s do a sample exercise I’m about to tweet about my latest blog post! How

can I track visits from it in GA? (Oh, and I used a a tinyURL to my post)

Page 22: Googleanalytics startpadv2-090409122023-phpapp01

Campaign TrackingTinyURL, and other URL shorteners

Use 301 (302, 307) redirects301s don’t show as referrers (but rather direct

traffic)Only way to track is via campaign tagging (or

distinct landing page not easily reachable in other ways)

Campaign Trackinghttp://www.google.com/support/googleanalytics/bin/

answer.py?hl=en&answer=55578Helps you build:

http://mydomain.com/cool-blog-post?utm_source=twitter_followers&utm_medium=tweet&utm_campaign=Tweets_for_April

Page 23: Googleanalytics startpadv2-090409122023-phpapp01

Tracking this tweet, and all future onesCreate an Advanced Segment

Page 24: Googleanalytics startpadv2-090409122023-phpapp01

Apply the segment to reports

Page 25: Googleanalytics startpadv2-090409122023-phpapp01

Being diligent about campaign taggingYes, it can be tediousSome URL shorteners have APIs, so you can

automatically add your tracking tags to them(I haven’t experimented with them)

Page 26: Googleanalytics startpadv2-090409122023-phpapp01

Cookie Based User Segments For tracking repeat users, visitors to special

areas of your site, etc.Members vs. non-members, purchasers vs.

window shoppers, etc.Use _setVar(newVal), from the API (Hack

#3)A visitor to http://mysite.com/soccer.php

_setVar(“soccerFan”)A visitor to http://mysite.com/baseball.php

_setVar(“baseballPlayer”)

Page 27: Googleanalytics startpadv2-090409122023-phpapp01

Cookie based trackingA gotcha!

_setVar overwrites any previous valueSo a user visits:

First 30 “soccer” pages – gets tagged as “soccerFan” 31st page is a baseball page – gets overwritten as

“baseballPlayer”Solutions

Use sparingly Minimize the values you set, pages you set things on

Ie, only set a user as a “purchaser” if she gets to the “order confirmation page”; no other page on the site sets anything

Or…

Page 28: Googleanalytics startpadv2-090409122023-phpapp01

Multiple values…store more than one value in the variable

Append multiple values in a var using Hack #4

User value becomes: “/eyes=blue/hair=blonde”Using superSetVar <3rd party script>See http://tinyurl.com/6cg4j4Implementation (after installing script):

superSetVar('/eyes=blue');superSetVar('/hair=blonde');

Page 29: Googleanalytics startpadv2-090409122023-phpapp01
Page 30: Googleanalytics startpadv2-090409122023-phpapp01

Event trackingSTILL in “beta”Event tracking measures non-pageview

elements:Any Flash-driven element, like a Flash website, or

a Flash Movie player (“Play”, “Stop”, “Rewind”)Embedded AJAX page elements Page gadgets File downloads Load times for data And more…

Page 31: Googleanalytics startpadv2-090409122023-phpapp01

Event tracking methods_trackEvent() method parameters_trackEvent(category, action, optional_label, optional_value)

category (required) The name you supply for the group of objects you want to

track.action (required)

A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object.

label (optional) An optional string to provide additional dimensions to the

event data. value (optional)

An integer that you can use to provide numerical data about the user event.

Page 32: Googleanalytics startpadv2-090409122023-phpapp01

Event tracking example #1How many people played

my video?

pageTracker._trackEvent("Videos", "Play", " Obama sez stuff");

Page 33: Googleanalytics startpadv2-090409122023-phpapp01

Event tracking example #2When people use “search” on my site – how

many click the first result returned? The second?Search for “cookies”

Results: <#1> Chocolate chip <#2> Oreos <#3> Thin mints

In onclick event for eachpageTracker._trackEvent(“SearchResults", “clicks”, <result #>);

Page 34: Googleanalytics startpadv2-090409122023-phpapp01

Event trackingScreenshot of menu

Page 35: Googleanalytics startpadv2-090409122023-phpapp01

If Event Tracking isn’t turned onRequest it:

http://code.google.com/p/gaforflash/wiki/EventTrackingRequest

Or, better yet – become a GA beta testerhttp://code.google.com/apis/analytics/docs/

tracking/trustedTester.html

Page 36: Googleanalytics startpadv2-090409122023-phpapp01

In the meantime…_trackPageView() is just Javascript (Hack

#5)can be called on any Javascript event – clicks,

mouseovers, etc.Use one of your sandbox accounts (hack #1),

and start getting creative about “URLs” that represent event actions _trackPageView(“/theDudeClickedTheThing”);

Page 37: Googleanalytics startpadv2-090409122023-phpapp01

Up NextA/B testingGoals and ecommerceOther Analytics toolsOther resources

Page 38: Googleanalytics startpadv2-090409122023-phpapp01

Optimizing your content

Page 39: Googleanalytics startpadv2-090409122023-phpapp01

A/B TestingTwo types available

Pure A/B Entire pages/funnels are different

Multi-variate Multiple modules within a single page change

Both test page variations with to determine the best option to drive users to a single goal, or conversion page

Page 40: Googleanalytics startpadv2-090409122023-phpapp01

How to get to A/B

Page 41: Googleanalytics startpadv2-090409122023-phpapp01

How to set it up

Page 42: Googleanalytics startpadv2-090409122023-phpapp01

A/B in action

Page 43: Googleanalytics startpadv2-090409122023-phpapp01

A/BWhen in doubt

Choose pure A/B Pages/funnels are distinct

http://mydomain/homeA.php http://mydomain/homeB.php OR http://mydomain.com/?page=a (page=b)

Allows you to do much deeper content, user, and clickpath analysis What was the next most-visited page for “A” people?

What was the bounce rate for “B” people? Etc.

Page 44: Googleanalytics startpadv2-090409122023-phpapp01
Page 45: Googleanalytics startpadv2-090409122023-phpapp01

GoalsUse them!You want visitors to do something on your

websiteBuy somethingSubmit a formClick on an adEtc., etc.

Make goals for those “things”A goal is represented by a destination page (or

action)Can assign a single $$ value to each goal

Page 46: Googleanalytics startpadv2-090409122023-phpapp01

Faves.com exampleEach profile has multiple goals

Page 47: Googleanalytics startpadv2-090409122023-phpapp01

Goals EcommerceWhat if a goal can have multiple $$ values?

Use ecommerce feature, even if you don’t have a traditional ecommerce site

Use to assign a $$ value to any user behavior

For example – a lead generation siteA prospect submits your web form and gets a

confirmation pageHe/she has become a “lead” worth $15, even though he

never bought anythingTrack it using the ecommerce tags!

“Goals” feature is similar, but –If user behaviors can have multiple values, you’d have to

set up a new goal for *each* value

Page 48: Googleanalytics startpadv2-090409122023-phpapp01

Ecommerce codeOn the “bling” page

pageTracker._addTrans( "1234", // order ID - required “Mortgage Dept", // affiliation or store name “45.00", // total - required “0", // tax “0", // shipping “San Diego", // city "California", // state or province "USA" // country ); pageTracker._addItem( "1234", // order ID - necessary to associate item with transaction “5678", // SKU/code - required “Mortgage Lead", // product name “Subprime", // category or variation “45.00", // unit price - required "1" // quantity - required ); pageTracker._trackTrans();

Page 49: Googleanalytics startpadv2-090409122023-phpapp01

Airline site example In this example, no airline

tickets were actually purchased on this website; the user simply indicated an intent to purchase by clicking on each link

We still wanted to track the value of tickets that were potentially sold later, so we used the ecommerce feature of GA (not goals)

Page 50: Googleanalytics startpadv2-090409122023-phpapp01
Page 51: Googleanalytics startpadv2-090409122023-phpapp01

Other toolsOmniture or WebTrends instead?

In my opinion, GA is much better and less expensive

Honorary mention: ClicktaleLow cost usability analytics toolTracks user mouse movement on your pages,

gives you “videos” of what they’re doinghttp://www.clicktale.com

Page 52: Googleanalytics startpadv2-090409122023-phpapp01

Other resourcesOfficial Google Analytics Blog

http://analytics.blogspot.com/

Unofficial Google Analytics Bloghttp://www.roirevolution.com/blog/

Google Analytics Knowledge basehttp://www.google.com/support/

googleanalytics/

Page 53: Googleanalytics startpadv2-090409122023-phpapp01

Questions?Loren [email protected]

Page 54: Googleanalytics startpadv2-090409122023-phpapp01
Page 55: Googleanalytics startpadv2-090409122023-phpapp01

BotsGoogle Analytics doesn’t track “normal” bot

behavior (without hacking)“Normal” bots don’t call javascript…but there are a few workarounds to track them

Server side image pull of your GA image