startpad countdown 10 - confessions of a google analytics junkie
Post on 13-Apr-2017
3.403 Views
Preview:
TRANSCRIPT
Or…Confessions of a Google Analytics Junkie
Loren BastFounder, Bellusi LLC
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…”
On the agendaSetupProfiles and FiltersTracking User SegmentsEvent TrackingA/B TestingGoals & EcommerceOther Tracking ToolsOther ResourcesQ&A
To considerThere are two basic visitors to your site
HumansBots
Keep this in mind throughout the presentation
Ensuring Correct Installation
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
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)
Referring Sites
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)
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>?
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”
)
• 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
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.
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
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.
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)
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
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?”)
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)
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
Tracking this tweet, and all future onesCreate an Advanced Segment
Apply the segment to reports
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)
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”)
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…
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');
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…
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.
Event tracking example #1How many people played
my video?
pageTracker._trackEvent("Videos", "Play", " Obama sez stuff");
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 #>);
Event trackingScreenshot of menu
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
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”);
Up NextA/B testingGoals and ecommerceOther Analytics toolsOther resources
Optimizing your content
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
How to get to A/B
How to set it up
A/B in action
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.
GoalsUse them!You want visitors to do something on your website
Buy 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
Faves.com exampleEach profile has multiple goals
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
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();
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)
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
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/
Questions?Loren Bastlorenbast@gmail.com
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
top related