Integrating Google Analytics into SharePoint
-
Upload
chad-schroeder -
Category
Technology
-
view
9.266 -
download
2
Transcript of Integrating Google Analytics into SharePoint
Integrating Google Analytics with SharePoint
SharePoint Saturday Virginia Beach 2011Chad Schroeder
OverviewWhat is Google AnalyticsHow to integrate
TrackingReporting
Google Analytics API’sDoes SharePoint need Google Analytics?
What is Google AnalyticsUsage Tracker
Client based JavaScript Pulls in resources from Google
servers, so clients need to be ableaccess Google
Can be customized in many waysAnalytics Data Repository
Resides within GoogleRobust reporting portal
Free
Page 1
GA JavaScript
Page 2
GA JavaScript
Google Analytics DashboardWeb-basedExtensive dimensions +metricsCustomizable
Filtering + Custom Reports
2007 Out of the box AnalyticsSite Collection &
Site LevelMax Granularity:
DayExport to
Excel/PDFFiltering: Only by
SiteSearch Analytics
Best bets dataDestination
pages
2010 Out of the Box AnalyticsAggregation
Web App Site Collection
Site
Max Granularity: DayExport to Excel (CSV)Custom Reports
Create an Excel file and connect back to SharePoint
WorkflowSchedule Reports/Alerts
Web Analytics Web Part
Report Date Range Export to
Spreadsheet Filter Paging Size
Summary Yes Yes No No
Number of Page Views Yes Yes No No
Number of Daily Unique Visitors Yes Yes No No
Number of Referrers Yes Yes No No
Top Pages Yes Yes Yes Yes
Top Visitors Yes Yes Yes Yes
Top Referrers Yes Yes Yes Yes
Top Destinations Yes Yes Yes Yes
Top Browsers Yes Yes Yes Yes
Number of Queries Yes Yes Yes No
Number of Collections Yes Yes No No
Top Site Collection Templates Yes Yes No No
Customized Reports Custom Custom Custom Custom
SharePoint ChallengesTracking
Include script with every pageSearchDocumentsIndividual Users
ReportingDisplay within SharePointFiltering
Intranets: Out of luck?Absolutely not! It will work on intranets
Assuming there is access from the client to Google
Documented that it can work here.Site must be accessed via FQDN
http://intranet http://intranet.site.local
->so set up a redirect to the fully qualified domain name->may have trusted zone implications on client
Non-default ports are OK (80, 443, 90210, x)Cannot be tricked via _setDomainName
Tracking SharePoint UsageSharePoint Google Analytics
Feature
HttpModule• HttpModules run for every
page
• Adds tracking script to every
page
• Non-obtrusive to existing sitesConfiguration
Page
• Associate to Google Account
• Set up user tracking,
exclusions, etc
Search Setup
• Configured within Google Analytics
dashboard
• Search elements identified via
querystring:
http://mysite/searchresults.aspx?k=searchterm
• Search Category is identified by ‘s’ parameter
• In 2010 it is ‘cs’
Tracking UsersUtilize Google Analytics API Custom VariablesDynamically generate script
Embed Username or Email in scriptPrivacy: Tracking username
may be a TOS violation Google Analytics TOS …especially if username
contains actual name elementsValues become report
dimensions: Display Filter Custom Reports
function NewDispEx
Tracking DocumentsCannot embed JavaScript in most docsNo good solution for tracking items opened
directly from MS Office appsInject some code into the document link
Use Google Analytics Tracking API to invoke page view
function DispEx
Track Page View
Analytics Data within SharePoint
Pull from Google Security: ClientLogin
Consume with Google Visualization Controls
Annotated Timeline
Line Chart Motion Chart Geo Map More!
SharePoint Google Analytics Feature
Configuration Page
GoogleAnalytics Client
Reports
• Authenticate with
• Request data from
• Define sets of
data
• Control
filtering
• Provide Google Analytics account credentials
Man
ag
em
en
t Pag
e
Google Visualization Controls
• Wrapped in ASP.NET UserControls
Google Analytics Tracking APIPage views
Manually invoke a page viewEvents
Track any action within the pageUsers
Cross domain trackingInject custom logic
ReferrersEcommerce + CampaignsCustomFull Reference:
http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html
Google Analytics Feed APIATOMMetricsDimensionsSorting, Filtering,
Date RangeSecurity
ClientLogin|AuthSub|OAuth
Reference: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html#browser
Metric Category Metric Name Description
M1. Visitor
ga:bounces The total number of single-page visits to your website.
ga:entrances The number of entrances to your website. The value will always be equal to the number of visits when aggregated over your entire website. Thus, this metric is most useful when combined with dimensions such as ga:landingPagePath, at which point entrances as a metric indicates the number of times a particular page served as an entrance to your website.
ga:exits The number of exits from your website. As with entrances, it will always be equal to the number of visits when aggregated over your entire website.
ga:visitors Total number of visitors to your website for the requested time period.
ga:visits The total number of visits over the selected dimension. A visit consists of a single-user session.
Dimension Category
Dimension Name Description
D1. Visitor
ga:browser The names of browsers used by visitors to your website. For example, "Internet Explorer" or "Firefox."
ga:browserVersion The browser versions used by visitors to your website. For example, 2.0.0.14
ga:city The cities of website visitors, derived from IP addresses. The city field falls in a hierarchy of geographical groupings used in Analytics, which proceeds in the following order: continent, sub-continent, country, region, sub-region, and city.
ga:connectionSpeed The qualitative network connection speeds of website visitors. For example, T1, DSL, Cable, Dialup.
ga:continent The continents of website visitors, derived from IP addresses.
ga:countOfVisits (deprecated)
See ga:visitCount. Number of visits to your website. This is calculated by determining the number of visitor sessions.
ga:country The countries of website visitors, derived from IP addresses.
ga:date The date of the visit. An integer in the form YYYYMMDD.
ga:day The day of the month from 01 to 31.
ga:daysSinceLastVisit
The number of days elapsed since visitors last visited your website. Used to calculate visitor loyalty.
Do you need Google Analytics?SP 2007 SP 2010 Google Analytics
Ease of IntegrationEnable Usage logging + processing services
Provision Web Analytics Service App
Solution Deployment, Google registration
Extensibility
Tracking done via W3C logsReporting pages static
Web Analytics Web PartData is still not really exposed – would have to be extracted from W3C logs or DB
Opportunity within tracking codeAPI allows reporting customizationAndroid/iPhone API’s
Maintainability
Log files on server(s)Compiled data within SSP DB
Can offload to another DB ServerRetain up to 25 months
Google does all the workRetain 2+ years
Reporting Power
Barebones Better than 2007 at least
Plenty + customizable
Capture Client InfoLimitedNo geographic info!
LimitedNo geographic info
Extensive
Data Ownership
All stays within SPDB space, extra service
All stays within SPDB space, extra service
Google holds dataNo resource concerns
Granularity
Measured to day levelNot filterable OOTB
Measured to day levelNot filterable OOTB
AJAX difficult to trackMeasured to hour level
Security
Requires Manage Hierarchy permission
View Web Analytics Data site permission req’d
Managed separately within GA portal
SearchBest Bets and Destinations
Search Admins catered to
More work to do
Check out Google Analytics if…Using SharePoint 2007 (MOSS)
Use SP 2010 and…Need more powerful reportingNeed granular information about usersHave to cross over web app boundariesWant to expose analytics data to end users
Contact [email protected]: @chadschroederhttp://chadschroeder.blogspot.com/Source code: http://
chadschroeder.blogspot.com/2011/01/sharepoint-saturday-virginia-beach-2011_11.html