implemetning google analytics - 2011-09-24 Google Devfest Chiangmai
Upcoming SlideShare
Loading in...5
×
 

implemetning google analytics - 2011-09-24 Google Devfest Chiangmai

on

  • 2,178 views

see how google analytics can work and do for your online business

see how google analytics can work and do for your online business

Statistics

Views

Total Views
2,178
Views on SlideShare
1,527
Embed Views
651

Actions

Likes
2
Downloads
40
Comments
0

3 Embeds 651

http://www.pawoot.com 623
http://pawoot.com 27
http://www.linkedin.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

implemetning google analytics - 2011-09-24 Google Devfest Chiangmai implemetning google analytics - 2011-09-24 Google Devfest Chiangmai Presentation Transcript

  • Implementing Google Analytics Vinoaj Vijeyakumaar Senior Conversion Specialist, Google Southeast Asiagplus.to/vinoaj twitter.com/vinoaj #devfestcm conversionroom-japac.blogspot.com Chiang Mai, 2011
  • Why measure?http://www.flickr.com/photos/screenpunk/2787210951/
  • The Role of the Web Analyst Reporting Actionable Insights http://www.flickr.com/photos/kire/797533507/sizes/o/in/photostream/ View slide
  • What does “Action” mean? Discovering new opportunities (eg. New markets, hot trends, customer segments) Optimisation Improving marketing strategies Maximising reach (eg. New markets, optimise messaging) of your apps and delighting users Enhancing the user experience (eg. Compelling content, optimal user flows) View slide
  • Agenda• How GA Works• Tracking –  Basics –  Event Tracking –  Custom Variables –  Social Interaction Tracking –  Campaign Variables –  Page Load Time Tracking• Mobile Tracking –  WAP –  Android and iOS• Tracking Other Platforms
  • How GA Works
  • google.co.th/analytics
  • GA Tracking Code (GATC)
  • Site & Application Reporting
  • Track Behaviour Behaviour Entry Exit Engagement Reports on 125+ standard metrics and dimensions 1 0
  • The GA Async Tracking Code Look for _gaq stack and execute queued commands HTML5: Execute script asynchronously Dynamically load the ga.js tracking library 1 1
  • How Google Analytics works 1. Request--"Show me this Website Server webpage" __utm.gif? utmwv=6.3&utmn=101027544&utmsr=1280x854&utm sc=32-bit&utmul=en&utmje=1&utmjv=1.5&utmfl=7.0 r24&utmdt=My <html> <head> ... 2. Serve page %20Website&utmhn=www.site.com&utmp=/ ... index.html&utmac=UA-51244-4&utmcc=__utma User %3D117945243.823564440.1131054947.1131080858.1 3. Request: ga.js 133834608.4%3B+__utmb%3D117945243%3B </head> <html> 5. Call trackPageview() ... +__utmc%3D117945243%3B+__utmz function ... 4. Serve ga.js %3D117945243.1131054947.3.2.utmccn%3DGoogle Servers 6. Read & write cookies Secure %28Spring%20Sale%29%7Cutmcsr%3D%28google 7. Send gif request. %29%7Cutmcmd%3D%28ppc%29% %7Cutmtm%3D Request contains %28shoes%29%3B data. 8. Serve gif
  • The __utm.gif hit __utm.gif? utmwv=6.3&utmn=101027544&utmsr=1280x854&utmsc=32- bit&utmul=en&utmje=1&utmjv=1.5&utmfl=7.0 r24&utmdt=My %20Website&utmhn=www.site.com&utmp=/ index.html&utmac=UA-51244-4&utmcc=__utma %3D117945243.823564440.1131054947.1131080858.1133834 608.4%3B+__utmb%3D117945243%3B+__utmc %3D117945243%3B+__utmz %3D117945243.1131054947.3.2.utmccn%3D%28Spring %20Sale%29%7Cutmcsr%3D%28google%29%7Cutmcmd%3D %28ppc%29% %7Cutmtm%3D%28shoes%29%3B Screen Resolution: 1280x854 Page Title: My Website Screen Colors: 32-bit Hostname: www.site.com Browser Language: English(en) Filename: /index.html Java Enabled? Yes (1) Google Analytics Account: UA-51244-4 Java Version: 1.5 Visits: 4 Flash Version: 7.0r24 Campaign: Spring Sale | Google(PPC) | shoes
  • Raw Data to Reports 1 4
  • GATC Basics
  • Understand the website structure Single Multiple domain domains Multiple sub- Multiple domains domains and multiple sub- domain
  • Simplest GATC Installation • All content on a single domain <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push([_setAccount, UA-XXXXX-X]); _gaq.push([_trackPageview]); (function() { var ga = document.createElement(script); ga.type = text/javascript; ga.async = true; ga.src = (https: == document.location.protocol ? https://ssl : http://www) + .google-analytics.com/ga.js; var s = document.getElementsByTagName(script)[0]; s.parentNode.insertBefore(ga, s); })(); </script>
  • GATC – Multiple Sub-Domains• Content exists on multiple sub-domains on a single top-level domain<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push([_setAccount, UA-XXXXX-X]); _gaq.push([_setDomainName, .mysite.com]); _gaq.push([_trackPageview]); (function() { var ga = document.createElement(script); ga.type = text/javascript; ga.async = true; ga.src = (https: == document.location.protocol ? https://ssl : http://www) + .google-analytics.com/ga.js; var s = document.getElementsByTagName(script)[0]; s.parentNode.insertBefore(ga, s); })();</script>
  • GATC – Multiple Domains• Content exists on multiple top-level domains _link()<script type="text/javascript"> Update all links between domains to include the _link() method. var _gaq = _gaq || []; <a href=“http://www.mysite-support.com” onclick=“_gaq.push _gaq.push([_setAccount, UA-XXXXX-X]); ([‘_link’, this.href]);”>Support</a> _gaq.push([_setDomainName, ’none]); _gaq.push([_setAllowLinker, true]); _gaq.push([_trackPageview]); (function() { var ga = document.createElement(script); ga.type = text/javascript; ga.async = true; ga.src = (https: == document.location.protocol ? https://ssl : http://www) + .google-analytics.com/ga.js; var s = document.getElementsByTagName(script)[0]; s.parentNode.insertBefore(ga, s); })();</script>
  • GATC – Multiple Domains and Sub-Domains• Content exists on multiple sub-domains on multiple top-level domain _link() Update all links between domains to<script type="text/javascript"> include the _link() method. var _gaq = _gaq || []; _gaq.push([_setAccount, UA-XXXXX-X]); Do not change links between sub- _gaq.push([_setDomainName, ’.mysite.com]); domains on the same top-level _gaq.push([_trackPageview]); domain. (function() { var ga = document.createElement(script); ga.type = text/javascript; ga.async = true; ga.src = (https: == document.location.protocol ? https://ssl : http://www) + .google-analytics.com/ga.js; var s = document.getElementsByTagName(script)[0]; s.parentNode.insertBefore(ga, s); })();</script>
  • Linking When content exists on multiple domains use linking methods to pass cookie information between domains: •  For HTTP GET include the _link() method. _link() •  Cookie info in URL parameters •  Redirects user to the new URL <a href=“http://www.example.com” onclick= “_gaq.push([‘_link’, this.href]);”>Example</a> •  For HTTP POST include the _linkByPost() method. •  Cookie info in action value •  Used for forms and iFrames on other domains SUBMIT <form action="http://www.shoppingcart.com/form.php" name="f" method="post” onsubmit=”_gaq.push([‘_linkByPost’, this]);"> . . . </form>
  • Event Tracking
  • Event Tracking•  Traditional Google Analytics is pageview based
  • What about the 1-page App/Site? • Single URL, no page refreshes
  • Enter Event Tracking• Track events on your site• Detect events and trigger tracking call_gaq.push([_trackEvent, Purpose Example category, Group of objects being Markers action, tracked Type of user interaction Click opt_label, with the object opt_value]); Additional info about Google the event Singapore Numerical data about 1 the event 2 5
  • Example: Tracking Outbound Social Media Links 2 6
  • Example: Tracking Outbound Links
  • YouTube Video Tracking Example http://vinnysapidemos.googlecode.com/svn/trunk/ google/analytics/youtube/js-player-tracking.html
  • How did visitors interact with my videos? (Action)
  • Which videos were played? (Label)
  • Custom Variables
  • Custom Variables: Extended Measurement Model Behaviour Entry Exit Engagement125+ Metrics and Dimensions+ X Custom Variables = Custom Measurement Platform 3 2
  • Custom Variables_setCustomVar(index, name, value, opt_scope);•  index – position to store and transmit the variable (1 to 5)•  name – variable name (e.g. “member-type”) (case sensitive)•  value – variable value (e.g. “premium”) (case sensitive)•  opt_scope – 1:visitor-level; 2:session-level; 3:page-level (default: 3)•  Note: Length of Name + Value cannot exceed 64 characters_setCustomVar(1, ‘foo’, ‘bar’, 2);
  • Visitor Level Custom Variables • Stays with the visitor across multiple visits to the site • Cannot store personally identifiable information _setCustomVar( 1, ‘MembershipLevel’, ‘Platinum’, 1);
  • Session Level Custom Variables • Labels a session • Variable is discarded once session ends _setCustomVar( 3, ‘UsedChatWidget’, ‘true’, 2);
  • Page Level Custom Variables • Useful for content grouping • Identify groups of pages according to attributes other than the page URL _setCustomVar( 5, ‘Author’, ‘John Jane Doe’, 3);
  • Social InteractionTracking
  • Measure use of social plugins on your website
  • What is social plugin tracking?Social plugin tracking in Analyticsshows you:•  How social plugins are used•  Behavior of socially engaged users•  Comparative performance of different social plugins•  What content is socially engaging
  • Setup for +1 buttonSetup for the button: NoneThe +1 button on your website is already tracked.
  • Setup for other networks• Other social buttons require a small javascript change to your website.When a social plugin is used call this method: _trackSocial(network, action, target_url);
  • Copy & paste Twitter & Facebook code http://code.google.com/apis/analytics/docs/tracking/gaTrackingSocial.html
  • Tracking Social InteractionsMilkADeal.com Google Confidential and Proprietary
  • <!– Email share button: --><a onclick="showMailer(&#039;Check out MilkADeal for hugediscounts in Malaysia! Here is my referral link: http://milkadeal.com/r/&#039;);return false;" href="#"><div id="lnkMail"></div></a><!– Functions to track email share button usage: --><script> function showMailer(myBody){ _gaTrack(); $(".winMessage").html(myBody); $("#mailer").modal(); } function _gaTrack() { _gaq.push([_trackSocial, email, share]); }</script>
  • What value do socially-engaged visitors hold for us? Google Confidential and Proprietary
  • Overview of Socially-Engaged Traffic Google Confidential and Proprietary
  • Where are the conversions? Google Confidential and Proprietary
  • Encourage more email sharing Google Confidential and Proprietary
  • Campaign Variables
  • 360 Degree Tracking 5 0
  • URL Campaign Variables http://www.yoursite.com/landingpage.html? utm_source=yahoo&utm_medium=cpc&utm_campaign=Ja n+2011+Campaign&utm_term=my+keyword http://www.yoursite.com/landingpage.html? utm_source=twitter&utm_medium=tweet&utm_campaign=J an+03+One+Day+Sale http://www.yoursite.com/landingpage.html? utm_source=email&utm_medium=link&utm_campaign=Jan +2011+Newsletter 5 1
  • Campaign Variable Basics Required Tags The Source is where the visitor was sent from. Examples: google, nytimes.com, facebook.com The Medium is the channel in which this URL is promoted. Examples: cpc, display, social, organic The Campaign should either indicate the overarching name for the marketing effort or just the specific ad campaign in which the ad lives. Optional Tags The Keyword is the search term that you bid on (search engines only) The Ad Content should indicate the ad name, copy, or other helpful information to identify the type of ad that was clicked.
  • Android Referral Tracking http://market.android.com/details?id=com.myorg.myapp&referrer=utm_source %3Dgoogle%26utm_medium%3Dcpc%26utm_term%3D %257Bkeyword%257D%26utm_content%3DAd%2520A %26utm_campaign%3DApp%2520Download http://yoursite.com/yourapp.apk&referrer=utm_source%3Dgoogle %26utm_medium%3Dcpc%26utm_term%3D%257Bkeyword%257D %26utm_content%3DAd%2520A%26utm_campaign%3DApp %2520Download 5 3
  • Example … Social Media http://www.yoursite.com/landingpage.html? utm_source=twitter& utm_medium=socialmedia& utm_campaign=My+social+campaign
  • Page Load Times
  • The Impact of Speed
  • Tracking setup<script type="text/javascript">var _gaq = _gaq || [];_gaq.push([_setAccount, UA-XXXXX-X]);_gaq.push([_trackPageview]);(function() {var ga = document.createElement(script);ga.type = text/javascript; ga.async = true;ga.src = (https: ==document.location.protocol ? https://ssl : http://www) + .google-analytics.com/ga.js;vars = document.getElementsByTagName(script)[0]; s.parentNode.insertBefore(ga, s);})();</script>
  • Tracking setup<script type="text/javascript">var _gaq = _gaq || [];_gaq.push([_setAccount, UA-XXXXXX]);_gaq.push([_trackPageview]);_gaq.push([_trackPageLoadTime]);(function() {var ga = document.createElement(script); ga.type = text/javascript; ga.async= true;ga.src = (https: == document.location.protocol ? https://ssl : http://www) +.google-analytics.com/ga.js;var s = document.getElementsByTagName(script)[0];s.parentNode.insertBefore(ga, s);})();</script>
  • Tracking setup Hit
  • Tracking setup Time: 1.47 sec
  • Amari.com
  • Understanding Page Latency
  • Page Speed Online pagespeed.googlelabs.com
  • Page Speed Recommendations
  • Before & After Amari Package Selection Original Page Page Page Speed Score 62 / 100 First View Load Time 8.739s Optimizations include: •  Removed whitespace in HTML •  Using minified versions of JS libraries •  Using minified CSS •  Serving optimised images •  Testing serving GZIPped (compressed) content
  • Before & After Amari Package Selection Original Optimized % Page Page Page Change Page Speed Score 62 / 100 67 / 100 5% First View Load Time 8.739s 7.738s 11.5% Optimizations include: •  Removed whitespace in HTML •  Using minified versions of JS libraries •  Using minified CSS •  Serving optimised images •  Testing serving GZIPped (compressed) content
  • Mobile Tracking
  • Mobile Tracking HTML & WAP Applications iPhone Windows Mobile Blackberry Android Pearl & Curve http://code.google.com/apis/analytics/docs/tracking/mobileAppsTracking.html 6 8
  • Track Activity to Mobile Websites [link] Mobile Websites ü Server-side tracking ü Track all web-enabled devices (not just JS & cookie capable) ü Four languages supported: PHP, Perl, JSP, ASP ü Works just like Analytics on desktop web pages
  • Copy & Paste Snippets 7 0
  • A Quick Look at the PHP Code Snippet Insert a pixel for tracking Page rendering script Generate the pixel URL Send the request to GA ga.php 7 1
  • Server-to-Server Communications Secure Google Servers Website Server Request pixel: Send request to /ga.php?.... GA servers 7 2
  • Google Analytics Mobile SDK Native App Tracking Unique Users Pageviews Events Ecommerce Custom Variables Android Market Referrals
  • Setting Up A Tracker Object In An Activity GoogleAnalyticsTracker tracker; onCreate tracker = GoogleAnalyticsTracker.getInstance(); tracker.startNewSession("UA-xxx-y", this); 74
  • Dispatching EventsTracked data is queued and dispatched in bundles• Saves battery life• Can track when users are offlinetracker.dispatch(); - or - tracker.start("UA-xxx-y", 20, this); 75
  • Tracking User Preferences• How does user behavior differ by orientation?
  • Custom Variables Page tracker.setCustomVar(1, “orientation”, “portrait”, 3); tracker.setCustomVar(1, “orientation”, “landscape”, 3);
  • Reporting on User Preferences
  • Reporting on User Preferences
  • Reporting on User Preferences
  • Reporting on User Preferences
  • Reporting on User Preferences
  • Tracking In-App Purchases• How much revenue does my application generate?• Which products are most popular?
  • Reporting In App Purchases
  • Other Platforms
  • Tracking on Other Platforms 8 6
  • Chrome Extensions•  Load GA within Chrome extension page Call _trackPageView to measure extension activation Call _trackEvent to track interactions
  • Flash / Flex Track Pageviews Track Events
  • Silverlight 8 9
  • Resources
  • Subscribe for the Latest News Subscribe to receive latest articles in your inboxconversionroom-japac.blogspot.com
  • code.google.com/apis/analytics
  • Starter Guides•  Handy Google Analytics Resources: http://cse-sea.blogspot.com/2009/01/handy-google- analytics-resources.html•  Getting Started is Easy: http://cse-sea.blogspot.com/2009/03/google-analytics- getting-started-is.html 9 3
  • ConversionUniversity.com Your Name Here
  • Google Analytics Individual Qualification Your Name Here
  • Parties Can Verify Your Qualification Online 9 6
  • Recap
  • •  Data is Gold•  Tag & Track •  GA Tracking Code •  Event Tracking •  Custom Variables •  Social Interaction Tracking •  Campaign Variables •  Page Load Time Tracking•  Take Action!!
  • Thank You! @vinoaj; gplus.to/vinoaj; #devfestcm