Home | History | Annotate | Download | only in analytics
      1 <!DOCTYPE html>
      2 <!--
      3  * Copyright (c) 2009 The Chromium Authors. All rights reserved.  Use of this
      4  * source code is governed by a BSD-style license that can be found in the
      5  * LICENSE file.
      6 -->
      7 <html>
      8   <head>
      9     <style>
     10       body {
     11         width: 300px;
     12         color: #000;
     13         font-family: Arial;
     14       }
     15       #output {
     16         color: #d00;
     17         text-align: center;
     18       }
     19     </style>
     20   </head>
     21   <body>
     22     <script src="analytics.js"></script>
     23     <script>
     24       /**
     25        *  Tracks a single button click.  You can use the _trackEvent command
     26        *  to track user interactions with different parts of your extension.
     27        */
     28       function trackButton(button_id) {
     29         _gaq.push(['_trackEvent', 'button' + button_id, 'clicked']);
     30       }
     31     </script>
     32     <h1>Popup</h1>
     33     <p>Track the following actions:</p>
     34     <button onclick="trackButton(1);">Button 1</button>
     35     <button onclick="trackButton(2);">Button 2</button>
     36     <button onclick="trackButton(3);">Button 3</button>
     37     <button onclick="trackButton(4);">Button 4</button>
     38     <button onclick="trackButton(5);">Button 5</button>
     39     <button onclick="trackButton(6);">Button 6</button>
     40   </body>
     41 </html>
     42