Knowing is Understanding      A road trip through Google    analytics for Windows Phone
Who isTom Janssens
Who is?•   Name: Tom Janssens•   Independent consultant•   Starting indie game developer•   www: http://www.blugri.com•   ...
Google AnalyticsAccount Setup
Google Analytics – Account setup•   Accounts•   Web Properties•   Profiles•   Filters•   Advanced Segments•   Dashboards
Google Analytics – Accountstructure
Google Analytics – Accounts•   You can only start 20 accounts•   Given access to unlimited accounts
Google Analytics – WebProperties•   An account can have only 50 properties•   Web Property = tracking code
Google Analytics – Profilesand Filters•   Limited to 50 profiles (over all properties)•   Filters incoming data•   Filters...
Google Analytics – AdvancedSegments•   Isolate and analyse your analytics data•   Default or Custom Advanced Segments
Google Analytics – Dashboards•   Sticky to login•   Configuration sharing•   Widgets added via filters•   Export and Email
Google Analytics – Dashboards
Google Analytics –Multiple apps•   Use advances segments•   Or filter on e.g.    –   Page title
Google Analytics –Going live•   Go to marketplace   •   Or scan QR-code•   Search “sudoku”•   Search this icon•   Download...
Microsoft SilverlightAnalytics Framework      For Windows Phone
MSAF•   Web analytics Framework•   Supports    – Silverlight, WPF and Windows Phone    – Offline scenarios    – Pageview a...
MSAF
The code      C#
Adding it to your application•   Add the code to your App.xaml<Application.ApplicationLifetimeObjects>        <!--Required...
Adding it to your application•   And to App.xaml.cs<pre class="brush: csharp;">public partial class App : Application    {...
Application properties•   Google Analytics: 5 custom variablespublic class AnalyticsService : IApplicationService{        ...
Reading the manifestpublic class PhoneHelper{    const string AppManifestName = "WMAppManifest.xml";    const string AppNo...
Pageview Trackingpublic class AnalyticsService : IApplicationService{    private readonly IApplicationService _innerServic...
Pageview Tracking•   Basic tracking    – For apps with many pages    – Shows in analytics as pagename.xaml?p1=v1•   Realti...
Event Trackingpublic class AnalyticsTracker{    private AnalyticsService _service;    public AnalyticsTracker(AnalyticsSer...
Event Trackingused for pageviewspublic void TrackPageView(string pageViewName){    // Avoid double tracking    if (_servic...
References•   Google.WebAnalytics•   Microsoft.WebAnalytics•   Microsoft.WebAnalytics.Behaviors•   Microsoft.WebAnalytics....
Tracking  optionsUseful tracks
Useful trackings•   Reviews and Sharing    – Event Tracking    – Get insights where to place your share /      review butt...
Useful trackings•   Version Tracking    – Updates vs new downloads    – Sticky users vs user growth    – Store current ver...
Useful trackingsstring installedVersion = AppSettingsAndStatistics.Instance.ApplicationVersion;string currentVersion = Ana...
Useful trackings•   Application events    –   Game modes        •   Game controls        •   Levels played / Difficulty   ...
Resources     Links
Links•   https://www.google.com/ads/agencyedge/•   http://msaf.codeplex.com/•   http://www.windowsphonegeek.com/news/    a...
Upcoming SlideShare
Loading in …5
×

Knowing is Understanding: A road trip through Google analytics for Windows Phone

1,051 views
977 views

Published on

In this presentation you are taken on an intruductory roadtrip on Google Analytics for Windows Phone.

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,051
On SlideShare
0
From Embeds
0
Number of Embeds
207
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Independent consultant, mainly .NET, functional analystLong term experience in mobileWhat am I not:No google analytics expert or certificationLearned from experience and tracking windows phone applications in the last 6 months
  • Before we start: who are you?Who has already used google analytics?Who has already used filters?Who has already used advanced segments?Who has already used google analytics for silverlight / windows phone?Why google analytics: because I wanted the data as raw as possible?
  • Used when data is collected:AccountsWeb propertiesProfilesFiltersUsed / Customizable anytimeAdvances segmentsDashboards
  • Start max 20 accounts, but given access to unlimited  client should start the accountNo more than one account / clientElse clients have access to each other dataShow account list in gaShow how to set up an account
  • NOT POSSIBLE to change property from one account to anotherWeb property = tracking codeShow how to create a property
  • Profile is a filtered web propertyMultiple filters can be appliedData that is not in the filter cannot be usedShow how to create profiles / filters
  • More flexible than filters.Can be changed at runtime Not always 100% correct as not all data is usedShow how to create advanced sements
  • More flexible than filters. Can be changed at runtimeConfiguration sharing happens at time of sharing, updates of configuration are not automatically sharedExport and email is PDF onlyShow how to create dashboards
  • More flexible than filters. Can be changed at runtimeConfiguration sharing happens at time of sharing, updates of configuration are not automatically sharedExport and email is PDF only
  • Filter on page title: Only when pages are tracked manually and page title is application name
  • Only when pages are tracked manually and page title is application nameShow real time analytics
  • Support for many analytics services
  • - Any information of the phone or user can be used as a custom variable- But remember filters do not work on custom variables
  • Any information of the phone or user can be used as a custom variableOther custom variables are generally read from the manifest fileXml parserCopied from coding4fun libraryUse complete library if you use other features
  • Any information of the phone or user can be used as a custom variable
  • You can track more than pageviewsEvent tracking is most useful for apps as they tell what the user does
  • Any information of the phone or user can be used as a custom variable
  • Microsoft does not provide version informationTracking from Microsoft is a couple of days behind
  • Knowing is Understanding: A road trip through Google analytics for Windows Phone

    1. 1. Knowing is Understanding A road trip through Google analytics for Windows Phone
    2. 2. Who isTom Janssens
    3. 3. Who is?• Name: Tom Janssens• Independent consultant• Starting indie game developer• www: http://www.blugri.com• Facebook: http://www.facebook.com/blugri• Twitter: @blugri
    4. 4. Google AnalyticsAccount Setup
    5. 5. Google Analytics – Account setup• Accounts• Web Properties• Profiles• Filters• Advanced Segments• Dashboards
    6. 6. Google Analytics – Accountstructure
    7. 7. Google Analytics – Accounts• You can only start 20 accounts• Given access to unlimited accounts
    8. 8. Google Analytics – WebProperties• An account can have only 50 properties• Web Property = tracking code
    9. 9. Google Analytics – Profilesand Filters• Limited to 50 profiles (over all properties)• Filters incoming data• Filters executed in order of definition• Always keep a profile with all raw data
    10. 10. Google Analytics – AdvancedSegments• Isolate and analyse your analytics data• Default or Custom Advanced Segments
    11. 11. Google Analytics – Dashboards• Sticky to login• Configuration sharing• Widgets added via filters• Export and Email
    12. 12. Google Analytics – Dashboards
    13. 13. Google Analytics –Multiple apps• Use advances segments• Or filter on e.g. – Page title
    14. 14. Google Analytics –Going live• Go to marketplace • Or scan QR-code• Search “sudoku”• Search this icon• Download and start!
    15. 15. Microsoft SilverlightAnalytics Framework For Windows Phone
    16. 16. MSAF• Web analytics Framework• Supports – Silverlight, WPF and Windows Phone – Offline scenarios – Pageview and event tracking – …• Extensible• Get it from http://msaf.codeplex.com/
    17. 17. MSAF
    18. 18. The code C#
    19. 19. Adding it to your application• Add the code to your App.xaml<Application.ApplicationLifetimeObjects> <!--Required object that handles lifetime events for the application--> <shell:PhoneApplicationService Launching="Application_Launching" Closing="Application_Closing" Activated="Application_Activated" Deactivated="Application_Deactivated"/> <Analytics:AnalyticsService x:Name="analyticsService" WebPropertyId="UA-12345678-9"AutomaticPageTrackingEnabled="True" /> </Application.ApplicationLifetimeObjects>
    20. 20. Adding it to your application• And to App.xaml.cs<pre class="brush: csharp;">public partial class App : Application { private AnalyticsTracker _tracker; public AnalyticsTracker Tracker { get { if (_tracker == null) { AnalyticsService service = null; foreach (var obj in this.ApplicationLifetimeObjects) { if (typeof(AnalyticsService).Equals(obj.GetType())) { service = obj as AnalyticsService; break; } } _tracker = new AnalyticsTracker(service); } return _tracker; } } }
    21. 21. Application properties• Google Analytics: 5 custom variablespublic class AnalyticsService : IApplicationService{ Key 1: ProductID private readonly IApplicationService _innerService; private readonly GoogleAnalytics _googleAnalytics; public AnalyticsService() Key 2: User defined { _googleAnalytics = new GoogleAnalytics(); _googleAnalytics.CustomVariables.Add( new PropertyValue { Key 3: User defined PropertyName = "Device ID", Value = AnalyticsProperties.DeviceId }); ... Key 4: User defined }} Key 5: User defined
    22. 22. Reading the manifestpublic class PhoneHelper{ const string AppManifestName = "WMAppManifest.xml"; const string AppNodeName = "App"; public static string GetAppAttribute(string attributeName) { try { var settings = new XmlReaderSettings { XmlResolver = new XmlXapResolver() }; using (var rdr = XmlReader.Create(AppManifestName, settings)) { rdr.ReadToDescendant(AppNodeName); if (!rdr.IsStartElement()) { throw new FormatException(AppManifestName + " is missing " + AppNodeName); } return rdr.GetAttribute(attributeName); } } catch (Exception) { return ""; } }}
    23. 23. Pageview Trackingpublic class AnalyticsService : IApplicationService{ private readonly IApplicationService _innerService; private readonly GoogleAnalytics _googleAnalytics; public AnalyticsService() { _googleAnalytics = new GoogleAnalytics(); _googleAnalytics.CustomVariables.Add( new PropertyValue { PropertyName = "Device ID", Value = AnalyticsProperties.DeviceId }); ... _innerService = new WebAnalyticsService { IsPageTrackingEnabled = true, Services = { _googleAnalytics, } }; }}
    24. 24. Pageview Tracking• Basic tracking – For apps with many pages – Shows in analytics as pagename.xaml?p1=v1• Realtime analytics
    25. 25. Event Trackingpublic class AnalyticsTracker{ private AnalyticsService _service; public AnalyticsTracker(AnalyticsService service) { CompositionInitializer.SatisfyImports(this); _service = service; } [Import("Log")] public Action<AnalyticsEvent> Log { get; set; } public void Track(string category, string name, string actionValue) { Log(new AnalyticsEvent { Category = category, Name = name, ObjectName = actionValue }); }}
    26. 26. Event Trackingused for pageviewspublic void TrackPageView(string pageViewName){ // Avoid double tracking if (_service != null && !_service.AutomaticPageTrackingEnabled) { Log(new AnalyticsEvent { ActionValue = pageViewName, HitType = Microsoft.WebAnalytics.Data.HitType.PageView, Name = "CurrentScreenChanged", NavigationState = pageViewName, ObjectType = pageViewName, AppName = Analytics.AnalyticsProperties.ApplicationTitle }); } }}
    27. 27. References• Google.WebAnalytics• Microsoft.WebAnalytics• Microsoft.WebAnalytics.Behaviors• Microsoft.WebAnalytics.Navigation• Microsoft.SilverlightMediaFramework.Compat ibility.Phone – Replaces: • System.ComponentModel.Composition • System.ComponentModel.Composition.Initialization• System.Windows.Interactivity
    28. 28. Tracking optionsUseful tracks
    29. 29. Useful trackings• Reviews and Sharing – Event Tracking – Get insights where to place your share / review buttons
    30. 30. Useful trackings• Version Tracking – Updates vs new downloads – Sticky users vs user growth – Store current version in isolated storage
    31. 31. Useful trackingsstring installedVersion = AppSettingsAndStatistics.Instance.ApplicationVersion;string currentVersion = Analytics.AnalyticsProperties.ApplicationVersion;if (installedVersion == null){ AppSettingsAndStatistics.Instance.ApplicationVersion = currentVersion; ((Sudoku.App)App.Current).Tracker.Track("Installation”, "New", string.Format("new version: {0}”, Analytics.AnalyticsProperties.ApplicationVersion));}else if (!installedVersion.Equals(currentVersion)) { AppSettingsAndStatistics.Instance.ApplicationVersion = currentVersion; ((Sudoku.App)App.Current).Tracker.Track("Installation", "Update", string.Format("old version: {0} - new version: {1}", installedVersion, currentVersion));}
    32. 32. Useful trackings• Application events – Game modes • Game controls • Levels played / Difficulty – Use of Hints, Tips, … – Advertising • Providers • Number of ads displayed, clicked – …
    33. 33. Resources Links
    34. 34. Links• https://www.google.com/ads/agencyedge/• http://msaf.codeplex.com/• http://www.windowsphonegeek.com/news/ analyze-the-use-of-a-wp7-app-with- google-analytics-and-microsoft-silverlight- analytics-framework-msaf

    ×