Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

StartPad Countdown 10 - Confessions of a Google Analytics Junkie


Published on

You've got a website with a fair amount of traffic. You're also using Google Analytics to measure that traffic, but you don't feel like you're using it to its full potential. Well, help is here. Loren Bast, self-proclaimed "Google Analytics Junkie", will take you beyond the basics. He'll show you how to make sure your setup is correct (it often is not), how to tweak your profiles to get a more canonical view of your data, and show you hacks to give you insight into your new channels of traffic (your twitter feed, your blog) and how GA can help you in the SEO front.

Published in: Technology
  • Be the first to comment

StartPad Countdown 10 - Confessions of a Google Analytics Junkie

  1. 1. Or…Confessions of a Google Analytics Junkie Loren Bast Founder, Bellusi LLC
  2. 2. Who this is for, what I’ll cover <ul><li>Who this is for </li></ul><ul><ul><li>Regular GA users – not complete newbies </li></ul></ul><ul><ul><ul><li>Not afraid to monkey with Javascript </li></ul></ul></ul><ul><ul><li>Don’t be afraid to ask questions! </li></ul></ul><ul><li>What I’ll cover </li></ul><ul><ul><li>Various hacks, little-known or understood features, etc. </li></ul></ul><ul><ul><ul><li>Not a feature-by-feature walkthrough </li></ul></ul></ul><ul><ul><li>Designed to give you ideas, not be an exact roadmap for things you should do </li></ul></ul><ul><ul><ul><li>Can easily fall into the trap of “give a boy a hammer…” </li></ul></ul></ul>
  3. 3. On the agenda <ul><li>Setup </li></ul><ul><li>Profiles and Filters </li></ul><ul><li>Tracking User Segments </li></ul><ul><li>Event Tracking </li></ul><ul><li>A/B Testing </li></ul><ul><li>Goals & Ecommerce </li></ul><ul><li>Other Tracking Tools </li></ul><ul><li>Other Resources </li></ul><ul><li>Q&A </li></ul>
  4. 4. To consider <ul><li>There are two basic visitors to your site </li></ul><ul><ul><li>Humans </li></ul></ul><ul><ul><li>Bots </li></ul></ul><ul><li>Keep this in mind throughout the presentation </li></ul>
  5. 5. Ensuring Correct Installation
  6. 6. Setup & Installation <ul><li>Ensure your script installation is correct </li></ul><ul><ul><li>Use ga.js (new in late 2007) instead of urchin.js </li></ul></ul><ul><ul><ul><li>Urchin is being phased out; new GA features aren’t available for it </li></ul></ul></ul><ul><li>Are all your pages tagged? </li></ul><ul><ul><li>Check Traffic Sources/Referring Sites </li></ul></ul><ul><ul><ul><li>Are your own site pages coming up with high page counts? You may have problems – untagged pages are linking to tagged ones </li></ul></ul></ul><ul><ul><ul><ul><li>Tag not installed properly </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Page load issues – the tag doesn’t get called consistently </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Until this is fixed – your clickpath analysis, entrances/exits, etc., will be skewed </li></ul></ul></ul></ul></ul>
  7. 7. Your domain as high referrer Page 1 (tracked) Page 3 (tracked) <ul><li>What GA tracks </li></ul><ul><li>1 Exit </li></ul><ul><li>(Possibly 1 bounce) </li></ul><ul><li>1 Less Pageview </li></ul><ul><li>Any user campaigns are lost – session is over! </li></ul><ul><li>What GA tracks </li></ul><ul><li>1 Entrance (from a referring domain – yours!) </li></ul><ul><li>Possibly 1 bounce, if user leaves after this page) </li></ul>Page 2 (untracked)
  8. 8. Referring Sites
  9. 10. Profiles <ul><li>Profiles provide different views of data </li></ul><ul><ul><li>Have multiple sites? </li></ul></ul><ul><ul><ul><li>Track them using different profiles under one account </li></ul></ul></ul><ul><ul><li>Have multiple distinct areas of one site? </li></ul></ul><ul><ul><ul><li>Subdomains, subfolders, etc. </li></ul></ul></ul><ul><ul><ul><li>Use profiles to make analysis easier </li></ul></ul></ul><ul><ul><li>Want to track different data on the same site? </li></ul></ul><ul><ul><ul><li>Set up profiles as if you’re tracking two distinct domains ( Hack #1 ) </li></ul></ul></ul>
  10. 11. Tracking one site, different data <ul><li>Useful as a “sandbox” </li></ul><ul><ul><li>Create a new profile as if you were going to track a different domain, but enter in the same domain </li></ul></ul><ul><ul><li>Create new variables for multiple scripts </li></ul></ul><ul><ul><ul><li>var pageTracker = _gat._getTracker(“UA-<accountID>-1”); </li></ul></ul></ul><ul><ul><ul><li>pageTracker._trackPageview(); </li></ul></ul></ul><ul><ul><ul><li>var pageTracker2 = _gat._getTracker(&quot;UA-<accountID>- 2 &quot;); </li></ul></ul></ul><ul><ul><ul><li>pageTracker2 ._trackPageview( <different data> ); </li></ul></ul></ul><ul><ul><li>What do you mean, <different data>? </li></ul></ul>
  11. 12. Before we go on… <ul><li>Skim the Google Analytics Tracking API </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li>A handful of calls are useful, but the one we care about most (right now) is: </li></ul></ul><ul><ul><ul><li>_trackPageview (opt_pageURL) </li></ul></ul></ul><ul><ul><ul><li>Allows you to specify the URL (or data) that Google Analytics records, not the actual page URL ( Hack #2 ) </li></ul></ul></ul><ul><ul><ul><ul><li>For example: </li></ul></ul></ul></ul><ul><ul><ul><ul><li>pageTracker._trackPageview(“I_like_marshmallows”) </li></ul></ul></ul></ul>
  12. 13. <ul><li>The page URL </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li>pageTracker._trackPageview(); </li></ul></ul><ul><li>What you want Google to track in your sandbox profile </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li>pageTracker2 ._trackPageview( “/FoodCategoryPage” ); </li></ul></ul>Tracking different data
  13. 14. Profile Filters <ul><li>Profile filters </li></ul><ul><ul><li>Discard data you don’t care about </li></ul></ul><ul><ul><ul><li>Data that is filtered out is PERMANENTLY deleted from that profile </li></ul></ul></ul><ul><ul><ul><li>Therefore, create one completely unfiltered, raw profile to keep complete data records </li></ul></ul></ul><ul><ul><ul><ul><li>Name it such that people know not to use it unless they know what it’s for (ie, “Danger – Raw Data!”) </li></ul></ul></ul></ul><ul><ul><li>What data should you discard? Anything that: </li></ul></ul><ul><ul><ul><li>Makes analysis harder </li></ul></ul></ul><ul><ul><ul><li>Shouldn’t be seen by certain users </li></ul></ul></ul><ul><ul><ul><li>Examples: </li></ul></ul></ul><ul><ul><ul><ul><li>Corporate IP addresses (internal traffic), subdomains or subfolders with pages that don’t interact much with each other, etc. </li></ul></ul></ul></ul>
  14. 15. Profile filters <ul><li>Aggregate data to canonicalize your pages </li></ul><ul><ul><li>Make Google think that many individual pages show up as one…so… </li></ul></ul><ul><ul><ul><li>These pages: </li></ul></ul></ul><ul><ul><ul><li> ?ref=1 </li></ul></ul></ul><ul><ul><ul><li> </li></ul></ul></ul><ul><ul><ul><li> </li></ul></ul></ul><ul><ul><ul><li>Are really one page </li></ul></ul></ul><ul><ul><ul><li> </li></ul></ul></ul><ul><ul><li>Filter out the “ref” tag, and Google Analytics will treat the three pages as one </li></ul></ul>
  15. 16. Now: a word about SEO <ul><li>Real world example of how to use the hacks </li></ul><ul><ul><li>When you’re creating filters for you…think about your visiting bots </li></ul></ul><ul><ul><ul><li>They don’t know that “ref” in querystrings should be filtered out, so… </li></ul></ul></ul><ul><ul><ul><ul><li> </li></ul></ul></ul></ul><ul><ul><ul><ul><li> </li></ul></ul></ul></ul><ul><ul><ul><ul><li> </li></ul></ul></ul></ul><ul><ul><ul><li>Are still 3 distinct pages to them (with diluted “link juice”)* </li></ul></ul></ul><ul><ul><li>* Standard SEO caveats apply: should the pages be crawled in the first place? Are those URLs only generated by “humans”, not bots? Etc., etc. </li></ul></ul>
  16. 17. Canonical fixes <ul><li>Real world example, cont’d </li></ul><ul><ul><li>Google has worried about this…and in Feb 2009, came out with a fix – canonical tagging </li></ul></ul><ul><ul><ul><li> </li></ul></ul></ul><ul><ul><ul><li>Put this tag in your header on pages that need it: </li></ul></ul></ul><ul><ul><ul><ul><li><link rel=&quot;canonical&quot; href=&quot;;/> </li></ul></ul></ul></ul><ul><ul><ul><li>Track it using: </li></ul></ul></ul><ul><ul><ul><ul><li>One of your “sandbox” GA accounts (hack #1) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>pageTracker2._trackPageview(<canonical_URL>) (hack #2) </li></ul></ul></ul></ul>
  17. 18. One last word about profiles <ul><li>Profiles can be used for much more than analytics </li></ul><ul><ul><li>Example – to give your partners, customers, vendors reporting on only “their” portion of your site </li></ul></ul>
  18. 20. User Segments <ul><li>Two types of segmentation </li></ul><ul><ul><li>Session based (“who visited from the last email newsletter?”) </li></ul></ul><ul><ul><li>Cookie based (“what do ‘registered’ users do on their repeat visits to the site?”) </li></ul></ul>
  19. 21. Session based <ul><li>Single visit tracking </li></ul><ul><ul><li>Tracking visitors from emails, banner ads, URL shorteners (for Tweeting, etc.) </li></ul></ul><ul><ul><li>Let’s do a sample exercise </li></ul></ul><ul><ul><ul><li>I’m about to tweet about my latest blog post! How can I track visits from it in GA? </li></ul></ul></ul><ul><ul><ul><ul><li>(Oh, and I used a a tinyURL to my post) </li></ul></ul></ul></ul>
  20. 22. Campaign Tracking <ul><li>TinyURL, and other URL shorteners </li></ul><ul><ul><li>Use 301 (302, 307) redirects </li></ul></ul><ul><ul><li>301s don’t show as referrers (but rather direct traffic) </li></ul></ul><ul><ul><li>Only way to track is via campaign tagging (or distinct landing page not easily reachable in other ways) </li></ul></ul><ul><li>Campaign Tracking </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li>Helps you build: </li></ul></ul><ul><ul><ul><li> utm_source =twitter_followers& utm_medium =tweet& utm_campaign =Tweets_for_April </li></ul></ul></ul>
  21. 23. Tracking this tweet, and all future ones <ul><li>Create an Advanced Segment </li></ul>
  22. 24. Apply the segment to reports
  23. 25. Being diligent about campaign tagging <ul><li>Yes, it can be tedious </li></ul><ul><li>Some URL shorteners have APIs, so you can automatically add your tracking tags to them </li></ul><ul><ul><li>(I haven’t experimented with them) </li></ul></ul>
  24. 26. Cookie Based User Segments <ul><li>For tracking repeat users, visitors to special areas of your site, etc. </li></ul><ul><ul><li>Members vs. non-members, purchasers vs. window shoppers, etc. </li></ul></ul><ul><li>Use _setVar(newVal), from the API ( Hack #3 ) </li></ul><ul><ul><li>A visitor to </li></ul></ul><ul><ul><ul><li>_setVar(“soccerFan”) </li></ul></ul></ul><ul><ul><li>A visitor to </li></ul></ul><ul><ul><ul><li>_setVar(“baseballPlayer”) </li></ul></ul></ul>
  25. 27. Cookie based tracking <ul><li>A gotcha! </li></ul><ul><ul><li>_setVar overwrites any previous value </li></ul></ul><ul><ul><li>So a user visits: </li></ul></ul><ul><ul><ul><li>First 30 “soccer” pages – gets tagged as “soccerFan” </li></ul></ul></ul><ul><ul><ul><li>31 st page is a baseball page – gets overwritten as “baseballPlayer” </li></ul></ul></ul><ul><ul><li>Solutions </li></ul></ul><ul><ul><ul><li>Use sparingly </li></ul></ul></ul><ul><ul><ul><ul><li>Minimize the values you set, pages you set things on </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Ie, only set a user as a “purchaser” if she gets to the “order confirmation page”; no other page on the site sets anything </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>Or… </li></ul></ul></ul></ul>
  26. 28. Multiple values <ul><li>… store more than one value in the variable </li></ul><ul><ul><li>Append multiple values in a var using Hack #4 </li></ul></ul><ul><li>User value becomes: “/eyes=blue/hair=blonde” </li></ul><ul><ul><li>Using superSetVar <3 rd party script> </li></ul></ul><ul><ul><li>See </li></ul></ul><ul><ul><li>Implementation (after installing script): </li></ul></ul><ul><ul><ul><li>superSetVar('/eyes=blue'); superSetVar('/hair=blonde'); </li></ul></ul></ul>
  27. 30. Event tracking <ul><li>STILL in “beta” </li></ul><ul><li>Event tracking measures non-pageview elements: </li></ul><ul><ul><li>Any Flash-driven element, like a Flash website, or a Flash Movie player (“Play”, “Stop”, “Rewind”) </li></ul></ul><ul><ul><li>Embedded AJAX page elements </li></ul></ul><ul><ul><li>Page gadgets </li></ul></ul><ul><ul><li>File downloads </li></ul></ul><ul><ul><li>Load times for data </li></ul></ul><ul><ul><li>And more… </li></ul></ul>
  28. 31. Event tracking methods <ul><li>_trackEvent() method parameters </li></ul><ul><li>_trackEvent(category, action, optional_label, optional_value) </li></ul><ul><li>category (required) </li></ul><ul><ul><li>The name you supply for the group of objects you want to track. </li></ul></ul><ul><li>action (required) </li></ul><ul><ul><li>A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object. </li></ul></ul><ul><li>label (optional) </li></ul><ul><ul><li>An optional string to provide additional dimensions to the event data. </li></ul></ul><ul><li>value (optional) </li></ul><ul><ul><li>An integer that you can use to provide numerical data about the user event. </li></ul></ul>
  29. 32. Event tracking example #1 <ul><li>How many people played my video? </li></ul>pageTracker._trackEvent(&quot;Videos&quot;, &quot;Play&quot;, &quot; Obama sez stuff&quot;);
  30. 33. Event tracking example #2 <ul><li>When people use “search” on my site – how many click the first result returned? The second? </li></ul><ul><ul><li>Search for “cookies” </li></ul></ul><ul><ul><ul><li>Results: </li></ul></ul></ul><ul><ul><ul><ul><li><#1> Chocolate chip </li></ul></ul></ul></ul><ul><ul><ul><ul><li><#2> Oreos </li></ul></ul></ul></ul><ul><ul><ul><ul><li><#3> Thin mints </li></ul></ul></ul></ul><ul><ul><ul><li>In onclick event for each </li></ul></ul></ul><ul><ul><ul><ul><li>pageTracker._trackEvent(“SearchResults&quot;, “clicks”, <result #>); </li></ul></ul></ul></ul>
  31. 34. Event tracking <ul><li>Screenshot of menu </li></ul>
  32. 35. If Event Tracking isn’t turned on <ul><li>Request it: </li></ul><ul><ul><li> </li></ul></ul><ul><li>Or, better yet – become a GA beta tester </li></ul><ul><ul><li> </li></ul></ul>
  33. 36. In the meantime… <ul><li>_trackPageView() is just Javascript ( Hack #5 ) </li></ul><ul><ul><li>can be called on any Javascript event – clicks, mouseovers, etc. </li></ul></ul><ul><ul><li>Use one of your sandbox accounts (hack #1), and start getting creative about “URLs” that represent event actions </li></ul></ul><ul><ul><ul><li>_trackPageView(“/theDudeClickedTheThing”); </li></ul></ul></ul>
  34. 37. Up Next <ul><li>A/B testing </li></ul><ul><li>Goals and ecommerce </li></ul><ul><li>Other Analytics tools </li></ul><ul><li>Other resources </li></ul>
  35. 38. <ul><li>Optimizing your content </li></ul>
  36. 39. A/B Testing <ul><li>Two types available </li></ul><ul><ul><li>Pure A/B </li></ul></ul><ul><ul><ul><li>Entire pages/funnels are different </li></ul></ul></ul><ul><ul><li>Multi-variate </li></ul></ul><ul><ul><ul><li>Multiple modules within a single page change </li></ul></ul></ul><ul><ul><li>Both test page variations with to determine the best option to drive users to a single goal, or conversion page </li></ul></ul>
  37. 40. How to get to A/B
  38. 41. How to set it up
  39. 42. A/B in action
  40. 43. A/B <ul><li>When in doubt </li></ul><ul><ul><li>Choose pure A/B </li></ul></ul><ul><ul><ul><li>Pages/funnels are distinct </li></ul></ul></ul><ul><ul><ul><ul><li>http://mydomain/homeA.php </li></ul></ul></ul></ul><ul><ul><ul><ul><li>http://mydomain/homeB.php </li></ul></ul></ul></ul><ul><ul><ul><ul><li>OR </li></ul></ul></ul></ul><ul><ul><ul><ul><li> (page=b) </li></ul></ul></ul></ul><ul><ul><ul><li>Allows you to do much deeper content, user, and clickpath analysis </li></ul></ul></ul><ul><ul><ul><ul><li>What was the next most-visited page for “A” people? What was the bounce rate for “B” people? Etc. </li></ul></ul></ul></ul>
  41. 45. Goals <ul><li>Use them! </li></ul><ul><li>You want visitors to do something on your website </li></ul><ul><ul><li>Buy something </li></ul></ul><ul><ul><li>Submit a form </li></ul></ul><ul><ul><li>Click on an ad </li></ul></ul><ul><ul><li>Etc., etc. </li></ul></ul><ul><li>Make goals for those “things” </li></ul><ul><ul><li>A goal is represented by a destination page (or action) </li></ul></ul><ul><ul><li>Can assign a single $$ value to each goal </li></ul></ul>
  42. 46. example <ul><li>Each profile has multiple goals </li></ul>
  43. 47. Goals  Ecommerce <ul><li>What if a goal can have multiple $$ values? </li></ul><ul><ul><li>Use ecommerce feature, even if you don’t have a traditional ecommerce site </li></ul></ul><ul><ul><li>Use to assign a $$ value to any user behavior </li></ul></ul><ul><li>For example – a lead generation site </li></ul><ul><ul><li>A prospect submits your web form and gets a confirmation page </li></ul></ul><ul><ul><li>He/she has become a “lead” worth $15, even though he never bought anything </li></ul></ul><ul><ul><li>Track it using the ecommerce tags! </li></ul></ul><ul><li>“ Goals” feature is similar, but – </li></ul><ul><ul><li>If user behaviors can have multiple values, you’d have to set up a new goal for *each* value </li></ul></ul>
  44. 48. Ecommerce code <ul><li>On the “bling” page </li></ul><ul><ul><li>pageTracker._addTrans( </li></ul></ul><ul><ul><li>&quot;1234&quot;, // order ID - required </li></ul></ul><ul><ul><li>“ Mortgage Dept&quot;, // affiliation or store name </li></ul></ul><ul><ul><li>“ 45.00&quot;, // total - required </li></ul></ul><ul><ul><li>“ 0&quot;, // tax </li></ul></ul><ul><ul><li>“ 0&quot;, // shipping </li></ul></ul><ul><ul><li>“ San Diego&quot;, // city </li></ul></ul><ul><ul><li>&quot;California&quot;, // state or province </li></ul></ul><ul><ul><li>&quot;USA&quot; // country </li></ul></ul><ul><ul><li>); </li></ul></ul><ul><ul><li>pageTracker._addItem( </li></ul></ul><ul><ul><li>&quot;1234&quot;, // order ID - necessary to associate item with transaction </li></ul></ul><ul><ul><li>“ 5678&quot;, // SKU/code - required </li></ul></ul><ul><ul><li>“ Mortgage Lead&quot;, // product name </li></ul></ul><ul><ul><li>“ Subprime&quot;, // category or variation </li></ul></ul><ul><ul><li>“ 45.00&quot;, // unit price - required </li></ul></ul><ul><ul><li>&quot;1&quot; // quantity - required </li></ul></ul><ul><ul><li>); </li></ul></ul><ul><ul><li>pageTracker._trackTrans(); </li></ul></ul>
  45. 49. Airline site example <ul><li>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 </li></ul><ul><li>We still wanted to track the value of tickets that were potentially sold later, so we used the ecommerce feature of GA (not goals) </li></ul>
  46. 51. Other tools <ul><li>Omniture or WebTrends instead? </li></ul><ul><ul><li>In my opinion, GA is much better and less expensive </li></ul></ul><ul><li>Honorary mention: Clicktale </li></ul><ul><ul><li>Low cost usability analytics tool </li></ul></ul><ul><ul><li>Tracks user mouse movement on your pages, gives you “videos” of what they’re doing </li></ul></ul><ul><ul><li> </li></ul></ul>
  47. 52. Other resources <ul><li>Official Google Analytics Blog </li></ul><ul><ul><li> </li></ul></ul><ul><li>Unofficial Google Analytics Blog </li></ul><ul><ul><li> </li></ul></ul><ul><li>Google Analytics Knowledge base </li></ul><ul><ul><li> </li></ul></ul>
  48. 53. Questions? <ul><li>Loren Bast </li></ul><ul><li>[email_address] </li></ul>
  49. 55. Bots <ul><li>Google Analytics doesn’t track “normal” bot behavior (without hacking) </li></ul><ul><ul><li>“ Normal” bots don’t call javascript… </li></ul></ul><ul><ul><li>but there are a few workarounds to track them </li></ul></ul><ul><ul><ul><li>Server side image pull of your GA image </li></ul></ul></ul>