| <h1>Analytics</h1> |
| |
| <table class="intro"> |
| <tr> |
| <td><strong>Description:</strong></td> |
| <td>Use the Chrome Platform Analytics JavaScript library to measure user interactions with your app.</td> |
| </tr> |
| <tr> |
| <td><strong>Samples:</strong></td> |
| <td><a href="https://github.com/GoogleChrome/chrome-platform-analytics/tree/master/src/example">JavaScript and Closure examples</a></td> |
| </tr> |
| <tr> |
| <td><strong>Learn more:</strong></td> |
| <td> |
| <a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki">Chrome Platform Analytics</a></td> |
| </tr> |
| </table> |
| |
| <h2 id="overview">Overview</h2> |
| |
| <p> |
| The <a href="https://developers.google.com/analytics/devguides/platform/">Google Analytics Platform</a> 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. |
| <a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki">Chrome Platform Analytics</a> (CPA) is |
| a client library that lets you collect user interactions in Packaged Apps and Extensions, |
| and send them to the Google Analytics Platform. |
| </p> |
| |
| <p> |
| The CPA library follows the basic usage pattern of <a href="http://www.google.com/analytics/index.html">Google Analytics</a> |
| 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. |
| </p> |
| |
| <h2 id="privacy">Privacy</h2> |
| |
| <p> |
| <a href="https://developers.google.com/analytics/devguides/collection/protocol/policy">Google Analytics Policies</a> |
| 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. |
| </p> |
| |
| <h2 id="library">Library</h2> |
| |
| <p> |
| The CPA library is hosted on GitHub: <a href="https://github.com/GoogleChrome/chrome-platform-analytics">chrome-platform-analytics</a>. |
| </p> |
| |
| <p> |
| The library is <a href="https://github.com/GoogleChrome/chrome-platform-analytics/blob/master/google-analytics-bundle.js">google-analytics-bundle.js</a>. |
| </p> |
| |
| <h2 id="documentation">Documentation</h2> |
| |
| <p> |
| Documentation for the CPA library is aslo on GitHub. See specifically: |
| </p> |
| |
| <ul> |
| <li><a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki#prerequisites">Prerequisites</a></li> |
| <li><a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki#api-reference">API Reference</a></li> |
| <li><a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki#how-to">How-To</a></li> |
| </ul> |
| |
| |
| <h2 id="examples">Examples</h2> |
| |
| <p> |
| For an illustration of how to use the CPA library to measure user interactions in an app, see the |
| <a href="https://github.com/GoogleChrome/chrome-platform-analytics/tree/master/src/example">examples</a>. |
| </p> |