This page is part of the documentation for the Chrome Apps platform, which was deprecated in 2020. Chrome Apps in Kiosk Mode used by Enterprise and Education customers will no longer be supported after April 2027, marking their end of life. Additionally, all remaining Chrome Apps used in managed environments by Enterprise and Education organizations will reach their end of life in October 2028. Learn more about migrating your app.

Analytics

Description: Use the Chrome Platform Analytics JavaScript library to measure user interactions with your app.

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2013年08月01日 UTC.