integrating google analytics into sharepoint

17
Integrating Google Analytics with SharePoint SharePoint Saturday Virginia Beach 2011 Chad Schroeder

Upload: chad-schroeder

Post on 30-Jun-2015

9.273 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Integrating Google Analytics into SharePoint

Integrating Google Analytics with SharePoint

SharePoint Saturday Virginia Beach 2011Chad Schroeder

Page 2: Integrating Google Analytics into SharePoint

OverviewWhat is Google AnalyticsHow to integrate

TrackingReporting

Google Analytics API’sDoes SharePoint need Google Analytics?

Page 3: Integrating Google Analytics into SharePoint

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

Page 4: Integrating Google Analytics into SharePoint

Google Analytics DashboardWeb-basedExtensive dimensions +metricsCustomizable

Filtering + Custom Reports

Page 5: Integrating Google Analytics into SharePoint

2007 Out of the box AnalyticsSite Collection &

Site LevelMax Granularity:

DayExport to

Excel/PDFFiltering: Only by

SiteSearch Analytics

Best bets dataDestination

pages

Page 6: Integrating Google Analytics into SharePoint

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

Page 7: Integrating Google Analytics into SharePoint

SharePoint ChallengesTracking

Include script with every pageSearchDocumentsIndividual Users

ReportingDisplay within SharePointFiltering

Page 8: Integrating Google Analytics into SharePoint

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

Page 9: Integrating Google Analytics into SharePoint

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’

Page 10: Integrating Google Analytics into SharePoint

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

Page 11: Integrating Google Analytics into SharePoint

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

Page 12: Integrating Google Analytics into SharePoint

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

Google

• Request data from

Google

• 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

Page 13: Integrating Google Analytics into SharePoint

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

Page 14: Integrating Google Analytics into SharePoint

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.

Page 15: Integrating Google Analytics into SharePoint

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

Page 16: Integrating Google Analytics into SharePoint

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