Google analytics 301 is an in-depth, hands-on training day building on the knowledge acquired in analytics 101, 201 and 202. The course covers how Google Analytics works in detail including its architecture, hit processing and cookie technology as well as best practice deployment planning, configuration and set-up advice. The course also explains and demonstrates the many Google Analytics APIs for reading, writing and configuring data as well as advice, tips and examples for integrating Google Analytics into your organisation’s other systems, processes and technology. The day ends with a detailed audit process which helps asses your installation quality, health and completeness.
2. #GoogleAnalytics202 @ivantage with @matt_trimmer
2
Google Analytics & Tag Manager curriculum
• Google Analytics 101 - Fundamentals, key concepts and reporting basics
• Google Analytics 201 - Goals, events, views, basic filters, segments, alerts and best
practice campaigns
• Google Analytics 202 - Analysing organic search, paid search, in-bound social media
and attribution modelling
• Google Analytics 301 - Architecture, processing, configuration, extending and auditing
• Google Tag Manager 101 - Fundamentals, key concepts, basic tagging and advanced
event listener tagging
5. #GoogleAnalytics301 @ivantage with @matt_trimmer
5
Session 1 - Architecture, data collection and
processing
• Introductions, your objectives and building your 301 action plan
• Architecture, data collection and processing
• Understanding the Google account
• Auditing user access to your Google Analytics account *
• The Google Analytics Tracking Code (GATC)
• Understanding and analysing the Google Analytics hit
• Analysing the GA hit with Ghostery, Firebug, Google Tag Assist and the GA Chrome debugger
• Understanding and analysing Google Analytics Cookies
• Understanding and using the Google Analytics virtual pageview
• Understanding and exploring event tracking
• Understanding and exploring social interaction tracking
• Understanding and exploring e-commerce tracking
• Understanding and exploring enhanced e-commerce tracking
• Creating a new Google Analytics account, new web properties and new views
• Introducing and understanding Universal Analytics
• Introducing and understanding the Measurement Protocol
6. #GoogleAnalytics301 @ivantage with @matt_trimmer
6
Session 2 - Deployment, configuration and
set-up
• Deployment, configuration and set-up
• Deployment considerations - sub-domains, cross domains, iframe
• Understanding and deploying cross domain tracking
• Understanding and investigating self referrals
• Understanding and exploring traffic allocation
• Customising universal analytics behaviour via the user interface
• Customising universal analytics behaviour via coding customisations
• Editing your account settings *
• Understanding and complying with the Google Analytics terms of service
• Configuring your profile settings *
• Cleansing your data by excluding URL query parameters *
• Understanding and configuring site search *
• Understanding and configuring page grouping *
• Understanding and configuring error tracking*
• Understanding and using predefined filters *
• Understanding and using case transition filter*
• Understanding and using include and exclude filters*
• Understanding and using search and replace filters*
• Understanding and using common regular expressions*
• Understanding and using common advanced filters*
• Understanding and using common cascading advanced filters*
7. #GoogleAnalytics301 @ivantage with @matt_trimmer
7
Session 3 - Extending and integrating
• Understanding and using user defined and custom variables
• Understanding and using custom dimensions and metrics
• Understanding and using data import
• Understanding and using the client ID
• Understanding and using the user ID
• Understanding and complying with the Google Analytics terms of service with User ID
• Defining and understanding native session stitching
• Defining and understanding advanced session stitching
• Understanding and using alternative user tracking methods
• Understanding and exploring user ID examples
8. #GoogleAnalytics301 @ivantage with @matt_trimmer
8
Session 4 - The measurement protocol, APIs
and auditing your installation
• Understanding and using the new measurement protocol API
• Understanding and using the Google Hit Builder
• Understanding and exploring measurement protocol examples
• Introducing the management API
• Introducing and using the Account Explorer
• Introducing the provisioning API
• Introducing the core reporting API
• Introducing and using the GA query explorer
• Introducing and using the GA spread sheet add-on
• Introducing the multi-channel funnel reporting API
• Introducing the real time reporting API
• Introducing the embed API for dash boarding
• Introducing the metadata API
• Introducing the dimensions and metrics explorer
• Some really useful API approved applications
• Auditing your installation for quality and compleatness
• Wrap up, conclusions, your action plan and feedback
• * Google Analytics edit access required
13. #GoogleAnalytics301 @ivantage with @matt_trimmer
13
Access to Google Analytics
• Key concepts
• Minimise gmail addresses
• Use corporate email addresses
• Convert to a Google Account
• Shared admin/edit account for AdWords?
• Agencies
• Ownership?
• Who let’s who in?
• Resources
• https://goo.gl/hdqN9c
14. #GoogleAnalytics301 @ivantage with @matt_trimmer
14
Accessing Google Analytics
• Key concept
• Best not to share a log-in with colleagues!
• Best not to use a generic team-based log in!
• Security and confidentially issues
• GA has “personal” features
• Dashboards
• Annotations
• Shortcuts
• Alerts
• Segments
• Custom reports
• Scheduled emails
15. #GoogleAnalytics301 @ivantage with @matt_trimmer
15
Creating a new Google Analytics account
• Exercise
• Create a new Google Analytics Account
• Call it www.yournamewebsite.com
• Key Concept
• Issuing a new UA- code
• Terms of Services
• Understanding the Coding Wizard and common
configurations
17. !17
www.ivantage.co.uk
50
The Google Analytics Terms of Service
• 2. Fees and Service.
Subject to Section 15, the Service is provided without charge to You for up to 10 million Hits per month per account. Google may
change its fees and payment policies for the Service from time to time including the addition of costs for geographic data, the importing
of cost data from search engines, or other fees charged to Google or its wholly-owned subsidiaries by third party vendors for the
inclusion of data in the Service reports. The changes to the fees or payment policies are effective upon Your acceptance of those changes
which will be posted at http://www.google.com/analytics. Unless otherwise stated, all fees are quoted in U.S. Dollars. Any outstanding
balance becomes immediately due and payable upon termination of this Agreement and any collection expenses (including attorneys'
fees) incurred by Google will be included in the amount owed, and may be charged to the credit card or other billing mechanism
associated with Your AdWords account.
18. !18
www.ivantage.co.uk
51
The Google Analytics Terms of Service
• 7. Privacy.
You will not (and will not allow any third party to) use the Service to track, collect or upload any data that personally identifies an
individual (such as a name, email address or billing information), or other data which can be reasonably linked to such information
by Google. You will have and abide by an appropriate Privacy Policy and will comply with all applicable laws and regulations relating
to the collection of information from Visitors. You must post a Privacy Policy and that Privacy Policy must provide notice of Your use of
cookies that are used to collect traffic data, and You must not circumvent any privacy features (e.g., an opt-out) that are part of the
Service.
You may participate in an integrated version of Google Analytics and any DoubleClick product or service or any other Google display
ads product or service ("Google Analytics for Display Advertisers"). If You use Google Analytics for Display Advertisers, You will
comply with the Google Analytics for Display Advertisers Policy (available at http://support.google.com/analytics/bin/answer.py?
hl=en&topic=2611283&answer=2700409 ) and, as set forth in the policy, disclose in Your Privacy Policy (i) Your use of Google
Analytics for Display Advertisers and its features You use, and (ii) how Visitors can opt-out from Google Analytics for Display
Advertisers. Your access to and use of any DoubleClick or Google display ads data is subject to the applicable terms between You and
Google.
27. #GoogleAnalytics301 @ivantage with @matt_trimmer
27
The four GATCs - where to put them
• Urchin.js
• before closing </body>
• ga.js
• before closing </body>
• Supports Event Tracking
• ga.js (Asynchronous - )
• before closing </head>
• Supports earlier loading without risk to content rendering
• analytics.js (Asynchronous)
• before closing </head>
• Supports earlier loading without risk to content rendering
28. #GoogleAnalytics301 @ivantage with @matt_trimmer
28
Whatever the version, common principles
• Loading the master JavaScript file (ga.js or analytics.js)
• Setting the Google Analytics web property to be written to
• The pageview hit
ga('create', 'UA-XXXX-X', 'auto');
ga('send', 'pageview');
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
_uacct ="UA-xxxxx-x";
urchinTracker();
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
32. #GoogleAnalytics301 @ivantage with @matt_trimmer
32
The “__utm.gif” request from the ga.js to
Google
http://www.google-analytics.com/__utm.gif?
utmwv=5.4.8&utms=1&utmn=2057827531&utmhn=ivantage-
training.com&utmcs=windows-1252&utmsr=1440x900&utmvp=1425x77&utmsc=24-
bit&utmul=en-
us&utmje=0&utmfl=12.0%20r0&utmdt=RAGE%20Template%20One&utmhid=391906475
&utmr=http%3A%2F%2Fwww.google.com%2Furl%3Fsa%3Dt%26rct%3Dj%26q%3D%26esrc%
3Ds%26source%3Dweb%26cd%3D17%26ved%3D0CFAQFjAGOAo%26url%3Dhttp%253A%25
2F%252Fivantage-training.com%252F%26ei%3DBPg5U-
PnOtbLsQTVsYHwAg%26usg%3DAFQjCNFYl8Z4VCzcd2lyQ6y-
zYpQONKqyQ%26bvm%3Dbv.
63934634%2Cd.cWc&utmp=%2F&utmht=1396307980603&utmac=UA-27251347-7&ut
mcc=__utma%3D150063470.1121932111.1396307898.1396307898.1396307981.2%3B
%2B__utmz%3D150063470.1396307981.2.2.utmcsr%3Dgoogle%7Cutmccn%3D(organic)
%7Cutmcmd%3Dorganic%7Cutmctr%3D(not%2520provided)%3B&utmu=q~
33. #GoogleAnalytics301 @ivantage with @matt_trimmer
33
The “collect” request from the analytics.js to
Google
http://www.google-analytics.com/collect?
v=1&_v=j17&a=541739049&t=pageview&_s=1&dl=http%3A%2F
%2Fwww.ivantage-training.com%2Fdomains2-
UA.html%3Futm_source%3Dtest-source%26utm_medium%3Dtest-
medium%26utm_term%3Dtest-term%26utm_content%3Dtest-
content%26utm_campaign%3Dtest-name&ul=en-
us&de=windows-1252&dt=RAGE%20Template%20One&sd=24-
bit&sr=1440x900&vp=1425x417&je=0&fl=12.0%20r0&_utma=1
50063470.372043782.1396406835.1396406835.1396406972.2
&_utmz=150063470.1396406972.2.2.utmcsr%3Dtest-
source%7Cutmccn%3Dtest-name%7Cutmcmd%3Dtest-
medium%7Cutmctr%3Dtest-term%7Cutmcct%3Dtest-
content&_utmht=1396406985517&_u=MQAC~&cid=372043782.
1396406835&tid=UA-27251347-13&z=784772158
34. #GoogleAnalytics301 @ivantage with @matt_trimmer
34
Google Analytics cookies
UTMb - Visit cookie, lasts for 30 minutes from every page view
UTMa - Unique visitor cookie, lasts for 2 years from set or update on every page view
UTMc - Visit end cookie, not set to expire, does so when browser closes
UTMv - Not always set, requires the _setVar() command
UTMz - Campaign visit tracking cookie, determines traffic sources, lasts for 6 months from set or update on
every page view
43. #GoogleAnalytics301 @ivantage with @matt_trimmer
43
Event tracking (interaction versus non-
interaction)
• To change bounce or not to change bounce?
• By default, event tracking impacts your bounce rate
• ie - a visitor clicking on the video then leaving, has not
bounced.
• Set to true, event tracking does not impact bounce
• ie - a visitor clicking on the video then leaving, bounced.
48. #GoogleAnalytics301 @ivantage with @matt_trimmer
48
Enhanced E-commerce
• Product attributes
• Standard attributes
• Name, SKU, Category, Price, Quantity
• New attributes
• Brand, Variant, Coupon, Position in a List (Home page, Category, Sub-Category, Search Result Page)
• Product actions
• Standard actions
• Transaction
• New actions
• Impression view in a List (Home page, Category, Sub-Category, Search Result Page)
• Impression click in a List (Home page, Category, Sub-Category, Search Result Page)
• Impression detail view
• Add to basket
• Remove from basket
• Checkout
• Refund
50. #GoogleAnalytics301 @ivantage with @matt_trimmer
50
Universal Analytics
• Google Analytics reinvented (back end)
• Built on the Google Measurement Protocol
• The Measurement Protocol
• Here it is
• http://www.google-analytics.com/collect?
v=1&tid=UA-3742829-1&cid=999-000000&t=pageview&dp
=%2F*YourFirstName*-page-test-of-UA
• Hit builder
• https://ga-dev-tools.appspot.com/hit-builder/
51. #GoogleAnalytics301 @ivantage with @matt_trimmer
51
Universal Analytics with Measurement
Protocol?
• Now, any device on the Internet can write to Google
Analytics!
• Devices
• Mobiles, tablets, Google Glass, etc
• EPOS systems (Cash registers)
• Call Centres
• Interesting examples
• Analytics.js!
• Google SDKs for Android and iOS (First)
• Google Forms
• Search online for examples with movement, temperature, light
• Bizarre examples
• Dog collar
• Coffee machines
52. #GoogleAnalytics301 @ivantage with @matt_trimmer
52
Universal Analytics
• Reduces 4 cookies to 1
• Option to dispense with all cookies
• Your web technology sends a unique user ID via the
measurement protocol
• What does this mean?
• Visitor tracking not visit tracking (User ID)
• Your visitors interacting across multiple devices
• Web, app, tablet
• Your visitors interacting across multiple channels
• Store, catalogue, telephone
55. #GoogleAnalytics301 @ivantage with @matt_trimmer
55
Tracking sub-domains
• A.dog.com
• B.dog.com
• C.dog.com
• No code configuration required for Universal
• This was difficult under Classic
• Upgrading on sites that have sub-domains
• Self referrals will reduce
• Maybe run Classic and Universal and parallel
• Made want to add a filter to merge hostname and
request URI
56. #GoogleAnalytics301 @ivantage with @matt_trimmer
56
Filter for hostname and request URI merger
• A.dog.com/index.html - 10,000 Page views
• B.dog.com/index.html - 5,000 Page views
• C.dog.com/index.html - 5,000 Pageviews
• /index.html - 20,000 Page views
• Preserve hostname
• Filter Type: Custom filter > Advanced
Field A: Hostname
Extract A: (.*)
Field B: Request URI
Extract B: (.*)
Output To: Request URI
Constructor: $A1/$B1
58. #GoogleAnalytics301 @ivantage with @matt_trimmer
58
Cross domain tracking challenge
• X.com
• Y.com
• Analytics.js user first party cookie for Client ID
• Cookie can only be accessed on the domain on which
it is set.
• Y.com cannot access X.com
• Two Client IDs are set and so two sessions and
users
• So client ID stored in cookie needs to pass from
X.com to Y.com via URL (Decorated LINK)
59. #GoogleAnalytics301 @ivantage with @matt_trimmer
59
Cross domain tracking solution
• X.com
• Y.com
• Use the Cross Domain Auto Link plugin
• https://developers.google.com/analytics/devguides/collection/
analyticsjs/cross-domain#autolink
• Load the library
• Define domains
• Allow linker
• Links will decorate
• Ignore referrals
• May want to add a filter to merge hostname and request
URI
79. www.ivantage.co.uk
!79
Edit Account Settings
§ Exercise
§ Edit your Account Settings for any account
§ View your Urchin Account number (UA-XXXXX)
§ View your Account Name
§ View your data sharing settings
§ Key concepts
§ You can never change your UA number
§ Your can change your Google Analytics account name
§ Give it meaning
§ Add a number to bring to the top
§ Share your Google Analytics data with
§ Google Products for enhanced services like
» Adwords Conversion Optimizer
81. !81
www.ivantage.co.uk
50
The Google Analytics Terms of Service
• 2. Fees and Service.
Subject to Section 15, the Service is provided without charge to You for up to 10 million Hits per month per account. Google may
change its fees and payment policies for the Service from time to time including the addition of costs for geographic data, the importing
of cost data from search engines, or other fees charged to Google or its wholly-owned subsidiaries by third party vendors for the
inclusion of data in the Service reports. The changes to the fees or payment policies are effective upon Your acceptance of those changes
which will be posted at http://www.google.com/analytics. Unless otherwise stated, all fees are quoted in U.S. Dollars. Any outstanding
balance becomes immediately due and payable upon termination of this Agreement and any collection expenses (including attorneys'
fees) incurred by Google will be included in the amount owed, and may be charged to the credit card or other billing mechanism
associated with Your AdWords account.
82. !82
www.ivantage.co.uk
51
The Google Analytics Terms of Service
• 7. Privacy.
You will not (and will not allow any third party to) use the Service to track, collect or upload any data that personally identifies an
individual (such as a name, email address or billing information), or other data which can be reasonably linked to such information
by Google. You will have and abide by an appropriate Privacy Policy and will comply with all applicable laws and regulations relating
to the collection of information from Visitors. You must post a Privacy Policy and that Privacy Policy must provide notice of Your use of
cookies that are used to collect traffic data, and You must not circumvent any privacy features (e.g., an opt-out) that are part of the
Service.
You may participate in an integrated version of Google Analytics and any DoubleClick product or service or any other Google display
ads product or service ("Google Analytics for Display Advertisers"). If You use Google Analytics for Display Advertisers, You will
comply with the Google Analytics for Display Advertisers Policy (available at http://support.google.com/analytics/bin/answer.py?
hl=en&topic=2611283&answer=2700409 ) and, as set forth in the policy, disclose in Your Privacy Policy (i) Your use of Google
Analytics for Display Advertisers and its features You use, and (ii) how Visitors can opt-out from Google Analytics for Display
Advertisers. Your access to and use of any DoubleClick or Google display ads data is subject to the applicable terms between You and
Google.
90. www.ivantage.co.uk
!90
Creating duplicate “Profiles/Views”
• Exercise
• For your live account (do not go near the delete button!)
• Add new profiles/views:
• Call it www.mywebsite.com (Raw - Duplicate)
• Create a 2nd and call it www.mywebsite.com (Training IP Exclude)
• Create a 3rd and call it www.mywebsite.com (Sport Include)
• Create a 4th and call it www.mywebsite.com (Domains Exclude)
• Key concepts
• When you “Add a Profile for an existing domain” you effective duplicate
data collection from that point into a newly created Profile
• Duplicating profiles is important to
• Back-up your data
• Apply Filters (because Filter act at the data collection layer, they can
be destructive)
• For selective Profile access
• To create more that 20 goals
• To reduce sampling
95. www.ivantage.co.uk
!95
Use filters to negate sampling
• Key concept
• Report sampling occurs
• on ad-hoc data queries (cross segmenting or segments)
• when there’s 250,000 or more visits in the date range requested
• on any query
• involving 1,000,000 unique dimensions
• e.g, URLs, Keywords
• Slide sampling bar
• Reduce data range to reduce/negate Google Analytics sampling
• Include filters on duplicate Profiles can reduce/negate Google Analytics sampling
105. #GoogleAnalytics301 @ivantage with @matt_trimmer
105
The User-Defined Segment
• Set using a JavaScript function
• Assign users on a page load
• <body onLoad="javascript:pageTracker._setVar(‘Page X
Viewers');">
• Assign users to a segment when a link is clicked
• <a href="link.html" onClick="pageTracker._setVar(‘Link X
followers');">Click here</a>
106. #GoogleAnalytics301 @ivantage with @matt_trimmer
106
The User-Defined Segment
• Assign visitors to a segment based on their form selection
• In this example, visitors are assigned to a segment according to their selection in a
form.
• <form onSubmit="pageTracker._setVar(this.mymenu.options
[this.mymenu.selectedIndex].value);">
• <select name=mymenu>
• <option value=“Male (18-30)">Male (18-30)"> option>
• <option value="Male (30-65)">Male (30-65)"> </option>
• <option value="Male (65+)"> Male (65+)"> </option>
• <option value=" Female (18-35)">Female (18-35)"> </option>
• <option value=" Female (30-65)">Female (30-65)"> </option>
• <option value=" Female (65+)">Female (65+)"> </option>
• Voucher codes at checkout
• Measure off-line marketing promotions
• What‘s important for you to know about your visitors?
113. #GoogleAnalytics301 @ivantage with @matt_trimmer
113
Custom dimensions & metrics
• Create your own dimensions and metrics
• Like custom variables but server side
• Define them in the UI
• Dimension
• Hit
• Visit
• Visitor
• Metric
• Integer
• Currency
• Time
• Less data from browser to GA
115. #GoogleAnalytics301 @ivantage with @matt_trimmer
115
Sending
• Set as a part of an existing hit
• Page, event, transaction or social interaction
• ga('send', 'pageview', {'dimension15': 'My Custom
Dimension'});
• or with Set command before a hit
• var dimensionValue = 'SOME_DIMENSION_VALUE';
• ga('set', 'dimension1', dimensionValue);
• Scope and Precedence
• https://developers.google.com/analytics/devguides/
platform/customdimsmets#scope
129. #GoogleAnalytics301 @ivantage with @matt_trimmer
129
Google Analytics APIs
• Reporting APIs
• Multi-channel funnels reporting API
• API Explorer
• https://developers.google.com/apis-explorer/#p/analytics/v3/
• Real time reporting API
• API Explorer
• https://developers.google.com/apis-explorer/#p/analytics/v3/
135. #GoogleAnalytics301 @ivantage with @matt_trimmer
135
Getting help and going further
• Help Centre
• https://support.google.com/analytics/
• Blog
• http://analytics.blogspot.com/
• Forum
• https://productforums.google.com/forum/#!forum/analytics
• Developers
• https://developers.google.com/analytics/
• ivantage
• support@ivantage.co.uk
• Avinash’s Blog
• http://www.kaushik.net/avinash/
• Brian’s Blog
• http://www.advanced-web-metrics.com/