• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<h1>Analytics</h1>
2
3<table class="intro">
4  <tr>
5    <td><strong>Description:</strong></td>
6    <td>Use the Chrome Platform Analytics JavaScript library to measure user interactions with your app.</td>
7  </tr>
8  <tr>
9    <td><strong>Samples:</strong></td>
10    <td><a href="https://github.com/GoogleChrome/chrome-platform-analytics/tree/master/src/example">JavaScript and Closure examples</a></td>
11  </tr>
12  <tr>
13    <td><strong>Learn&nbsp;more:</strong></td>
14    <td>
15    <a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki">Chrome Platform Analytics</a></td>
16  </tr>
17</table>
18
19<h2 id="overview">Overview</h2>
20
21<p>
22The <a href="https://developers.google.com/analytics/devguides/platform/">Google Analytics Platform</a> lets you
23measure user interactions with your business across various devices and environments. The platform provides resources to
24collect, store, process, and report on user interactions.
25<a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki">Chrome Platform Analytics</a> (CPA) is
26a client library that lets you collect user interactions in Packaged Apps and Extensions,
27and send them to the Google Analytics Platform.
28</p>
29
30<p>
31The CPA library follows the basic usage pattern of <a href="http://www.google.com/analytics/index.html">Google Analytics</a>
32and will feel familiar to existing users of Google Analytics.
33However, unlike the web-centric official Google Analytics JavaScript libraries, the CPA library uses an "app-centric" model
34that is better suited for Packaged Apps. Among other features, the library provides methods for specific types of hits,
35such as "event" and "appView", and it can be used in both Closure-based and traditional JavaScript projects.
36</p>
37
38<h2 id="privacy">Privacy</h2>
39
40<p>
41<a href="https://developers.google.com/analytics/devguides/collection/protocol/policy">Google Analytics Policies</a>
42require you to give users notice about analytics tracking and the option to opt out of tracking.
43The CPA library makes it easy to build privacy-friendly apps by providing library-level support for user opt-out.
44</p>
45
46<h2 id="library">Library</h2>
47
48<p>
49The CPA library is hosted on GitHub: <a href="https://github.com/GoogleChrome/chrome-platform-analytics">chrome-platform-analytics</a>.
50</p>
51
52<p>
53The library is <a href="https://github.com/GoogleChrome/chrome-platform-analytics/blob/master/google-analytics-bundle.js">google-analytics-bundle.js</a>.
54</p>
55
56<h2 id="documentation">Documentation</h2>
57
58<p>
59Documentation for the CPA library is aslo on GitHub. See specifically:
60</p>
61
62<ul>
63  <li><a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki#prerequisites">Prerequisites</a></li>
64  <li><a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki#api-reference">API Reference</a></li>
65  <li><a href="https://github.com/GoogleChrome/chrome-platform-analytics/wiki#how-to">How-To</a></li>
66</ul>
67
68
69<h2 id="examples">Examples</h2>
70
71<p>
72For an illustration of how to use the CPA library to measure user interactions in an app, see the
73<a href="https://github.com/GoogleChrome/chrome-platform-analytics/tree/master/src/example">examples</a>.
74</p>
75