Analytics

Description:Use the Chrome Platform Analytics JavaScript library to measure user interactions with your app.
Samples:JavaScript and Closure examples
Learn more:Chrome Platform Analytics

Overview

The Google Analytics Platform lets you measure user interactions with your business across various devices and environments. The platform provides resources to collect, store, process, and report on user interactions. Chrome Platform Analytics (CPA) is a client library that lets you collect user interactions in Packaged Apps and Extensions, and send them to the Google Analytics Platform.

The CPA library follows the basic usage pattern of Google Analytics and will feel familiar to existing users of Google Analytics. However, unlike the web-centric official Google Analytics JavaScript libraries, the CPA library uses an "app-centric" model that is better suited for Packaged Apps. Among other features, the library provides methods for specific types of hits, such as "event" and "appView", and it can be used in both Closure-based and traditional JavaScript projects.

Privacy

Google Analytics Policies require you to give users notice about analytics tracking and the option to opt out of tracking. The CPA library makes it easy to build privacy-friendly apps by providing library-level support for user opt-out.

Library

The CPA library is hosted on GitHub: chrome-platform-analytics.

The library is google-analytics-bundle.js.

Documentation

Documentation for the CPA library is also on GitHub. See specifically:

Examples

For an illustration of how to use the CPA library to measure user interactions in an app, see the examples.