Google Universal Analytics for Unity

This package brings Google's Universal Analytics to Unity, with widest platform and Unity version coverage using the same asset. This is the only Google Analytics integration library with all of the features listed below.

  • Ready-made Analytics component for drag'n'drop integration.
  • Automatic sending of errors and exceptions to analytics.
  • Automatic client System Info statistics (sent on first launch).
  • Automatic events when new level/scene is loaded.
  • Automatic caching of analytics hits when user is offline and throttled sending of cached hits in the background.
  • Automatic reachability check which determines if client is offline or the analytics server is reachable.
    (Generalized version of this feature alone is also available as a separate product: Internet Reachability Verifier).
  • Use the same code to implement analytics for Desktop, Mobile and Web builds!
    • Browser: Unity Web Player plugin
    • Browser: Unity 5 WebGL (NEW!)
    • Desktop: Windows
    • Desktop: Mac OS X
    • Desktop: Linux
    • Desktop: Windows Store
    • Mobile: iOS
    • Mobile: Android
    • Mobile: Windows Phone
    • Mobile: BlackBerry 10
    • (Not tested on console platforms, but if UnityEngine.WWW class works, then this should as well.)
    • Note: No support for certain platform-specific features, such as
      demographics reporting or automatic tracking of traffic sources (iOS / Android specific).
  • Example scenes to show functionality and how to implement user opt-out possibility.
  • Comes with documentation:
    • guide to set up your tracking property to a Google Analytics account
    • integration instructions
    • helpful hints how to interpret analytics results and make a custom report.
    • Doxygen documentation for the code.
  • Complete API for the Measurement Protocol of Google Analytics.
  • Support for new set of Enhanced E-Commerce analytics (first integration library to add that!).
  • HTTP and HTTPS support.
  • Toggleable debug warnings, e.g. if you're going over session hit limit (enabled by default when running inside editor).
  • Designed with goal of having minimal amount of memory allocations.
  • Custom-built user agent strings on the platforms where that's required to improve detection by Google Analytics.
  • Full source code included. Implemented in Unity with C#.
  • No need for big platform-specific library files.
  • No need to tweak project files for each platform.
  • Maintained for Unity 4.x, Unity 3.5.7 and Unity 5.x.

  • Thread in Unity Forum

Note: The analytics service itself is run by Google, and offered for free but with certain features available only for Premium accounts. This package offers customized, optimized and easy integration of sending data to Google Analytics.


BUY HERE:
Click here to access
Google Universal Analytics for Unity
in the Asset Store


★★★
View WebGL build of the Google Universal Analytics Example
★★★

VERSION HISTORY

// 2016-01-29, 1.6.2 - Support fix for Unity 4.7. Use SceneManager on Unity 5.3+ (fixes warnings).

// 2015-05-21, 1.6.1 - Show visual warning when using example GA tracking property ID in own projects. Minor tweaks to WSA/WP compilation. Use newer/alternative automatic user language determination code on all platforms, mainly to fix iOS/IL2CPP 64-bit issues. Fixed asset store Unity 5 warning.
// 2015-05-08, 1.6.0 - Added support for Unity 5 WebGL platform. Clarified docs to reflect latest changes in measurement protocol specs. Added debug data validation warnings to send*Hit convenience methods. Added sendExceptionsAlsoFromEditor checkbox to make sending of exceptions optional when running in editor. Minor compile fix for Windows Store builds. Added new methods setDataSource and setGeographicalOverride.
// 2014-11-28, 1.5.1 - Small tweak to sendPageViewHit and its documentation. Upgrades for latest additions to measurement protocol: added addDOMInteractiveTime and addContentLoadTime. Verified Unity 4.6 compatibility, and made small changes to add preliminary compatibility with Unity 5 beta.
// 2014-08-29, 1.5.0 - Added option for automatically catching and sending of app errors and exceptions to analytics. Added Tooltips to component fields (for Unity 4.5 or newer). Changed SystemInfo events to be non-interactive and made sending of them an option, and when running on Unity 5 removed sending of deprecated graphicsPixelFillrate and added graphicsMultiThreaded. Moved user language setting to be part of the auto-added hit data and changed auto-initialized language to be in the language code format instead of plain English. Added custom user agent construction and usage for Windows desktop and Linux standalone builds. Added parameter category to start of the short doxygen doc info strings. Added big list of new "Enhanced E-Commerce" methods (if you want to use these, you should apparently replace existing E-Commerce code with new code using methods which belong to this category). Replaced addAnonymizeIP with setAnonymizeIP. Replaced addUserLanguage with setUserLanguage. Added cancelHit. Refined offline cached hit handling to cancel sending of hits with time way too far away from current time. Only for Web player builds: you can give null as the url string to addDocumentReferrer method, which means that the web page document.referrer will be used instead.
// 2014-06-16, 1.4.2 - Fixed offline cache for Windows Store builds. Added use of custom User-Agent on OSX. Changed method of generating anonymous client ID.
// 2014-05-12, 1.4.0 - Added offline caching of hits when not online, and internal way to track internet access status (is GA site reachable). Cache is automatically cleared when online, with throttled sending of hits. Updated API for latest changes in Measurement Protocol, and a few other API changes (see docs).
// 2014-02-18, 1.3.0 - LogError for trying to use default dummy Tracking ID or warning when using the example's ID. Use custom User-Agent on iOS (improve device detection). Fixed reset of sessionHitCountResetPending.
// 2013-12-17, 1.2.0 - Revised setup & integration instructions, with new example for making a custom report. Added new calls to set up link ID or content experiment parameters. Added built-in way to disable analytics for easier user opt-out & updated examples.
// 2013-12-12, 1.1.4 - Minor fix for trying to use Handheld class on Windows 8.
// 2013-09-25, 1.1.3 - Unity 3.5 support, minor tweaks.
// 2013-09-01, 1.1.1 - [First public release for Asset Store!] Session hit limit debug warning. Granularized some of the system info statistics. Different way to generate client ID for Android. Send 1st launch data only when network is reachable.
// 2013-06-28, 1.1.0 - Support for web player running in browser.
// 2013-05-03, 1.0.1 - Common instance, check for Internet reachability. Automatic events with OnLevelWasLoaded.
// 2013-04-26, 1.0.0 - Initial version.


Below:   Image of setting up Analytics component in Unity


BUY HERE:
Click here to access
Google Universal Analytics for Unity
in the Asset Store





Did you like how this Google Universal Analytics package is built? — Also from Strobotnik for Unity: Dynamic Text & Internet Reachability Verifier