Home | History | Annotate | Download | only in docs
      1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
      2     1) The <head> information in this page is significant, should be uniform
      3        across api docs and should be edited only with knowledge of the
      4        templating mechanism.
      5     3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
      6        browser, it will be re-generated from the template, json schema and
      7        authored overview content.
      8     4) The <body>.innerHTML is also generated by an offline step so that this
      9        page may easily be indexed by search engines.
     10 --><html xmlns="http://www.w3.org/1999/xhtml"><head>
     11     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     12     <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css">
     13     <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
     14     <script type="text/javascript" src="../../../third_party/jstemplate/jstemplate_compiled.js">
     15     </script>
     16     <script type="text/javascript" src="js/api_page_generator.js"></script>
     17     <script type="text/javascript" src="js/bootstrap.js"></script>
     18     <script type="text/javascript" src="js/sidebar.js"></script>
     19   <title>Tutorial: Google Analytics - Google Chrome Extensions - Google Code</title></head>
     20   <body>  <div id="gc-container" class="labs">
     21       <div id="devModeWarning">
     22         You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files.
     23       </div>
     24       <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
     25       <!-- In particular, sub-templates that recurse, must be used by allowing
     26            jstemplate to make a copy of the template in this section which
     27            are not operated on by way of the jsskip="true" -->
     28       <div style="display:none">
     29 
     30         <!-- VALUE -->
     31         <div id="valueTemplate">
     32           <dt>
     33             <var>paramName</var>
     34               <em>
     35 
     36                 <!-- TYPE -->
     37                 <div style="display:inline">
     38                   (
     39                     <span class="optional">optional</span>
     40                     <span class="enum">enumerated</span>
     41                     <span id="typeTemplate">
     42                       <span>
     43                         <a> Type</a>
     44                       </span>
     45                       <span>
     46                         <span>
     47                           array of <span><span></span></span>
     48                         </span>
     49                         <span>paramType</span>
     50                         <span></span>
     51                       </span>
     52                     </span>
     53                   )
     54                 </div>
     55 
     56               </em>
     57           </dt>
     58           <dd class="todo">
     59             Undocumented.
     60           </dd>
     61           <dd>
     62             Description of this parameter from the json schema.
     63           </dd>
     64           <dd>
     65             This parameter was added in version
     66             <b><span></span></b>.
     67             You must omit this parameter in earlier versions,
     68             and you may omit it in any version.  If you require this
     69             parameter, the manifest key
     70             <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
     71             can ensure that your extension won't be run in an earlier browser version.
     72           </dd>
     73 
     74           <!-- OBJECT PROPERTIES -->
     75           <dd>
     76             <dl>
     77               <div>
     78                 <div>
     79                 </div>
     80               </div>
     81             </dl>
     82           </dd>
     83 
     84           <!-- OBJECT METHODS -->
     85           <dd>
     86             <div></div>
     87           </dd>
     88 
     89           <!-- OBJECT EVENT FIELDS -->
     90           <dd>
     91             <div></div>
     92           </dd>
     93 
     94           <!-- FUNCTION PARAMETERS -->
     95           <dd>
     96             <div></div>
     97           </dd>
     98 
     99         </div> <!-- /VALUE -->
    100 
    101         <div id="functionParametersTemplate">
    102           <h5>Parameters</h5>
    103           <dl>
    104             <div>
    105               <div>
    106               </div>
    107             </div>
    108           </dl>
    109         </div>
    110       </div> <!-- /SUBTEMPLATES -->
    111 
    112   <a id="top"></a>
    113     <div id="skipto">
    114       <a href="#gc-pagecontent">Skip to page content</a>
    115       <a href="#gc-toc">Skip to main navigation</a>
    116     </div>
    117     <!-- API HEADER -->
    118     <table id="header" width="100%" cellspacing="0" border="0">
    119       <tbody><tr>
    120         <td valign="middle"><a href="http://code.google.com/"><img src="images/code_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:0; margin:0;"></a></td>
    121         <td valign="middle" width="100%" style="padding-left:0.6em;">
    122           <form action="http://www.google.com/cse" id="cse" style="margin-top:0.5em">
    123             <div id="gsc-search-box">
    124               <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno">
    125               <input type="hidden" name="ie" value="UTF-8">
    126               <input type="text" name="q" value="" size="55">
    127               <input class="gsc-search-button" type="submit" name="sa" value="Search">
    128               <br>
    129               <span class="greytext">e.g. "page action" or "tabs"</span>
    130             </div>
    131           </form>
    132 
    133           <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    134           <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
    135           <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse&t13n_langs=en"></script>
    136           <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse&lang=en"></script>
    137         </td>
    138       </tr>
    139     </tbody></table>
    140 
    141     <div id="codesiteContent" class="">
    142 
    143       <a id="gc-topnav-anchor"></a>
    144       <div id="gc-topnav">
    145         <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Labs</a>)</h1>
    146         <ul id="home" class="gc-topnav-tabs">
    147           <li id="home_link">
    148             <a href="index.html" title="Google Chrome Extensions home page">Home</a>
    149           </li>
    150           <li id="docs_link">
    151             <a href="docs.html" title="Official Google Chrome Extensions documentation">Docs</a>
    152           </li>
    153           <li id="faq_link">
    154             <a href="faq.html" title="Answers to frequently asked questions about Google Chrome Extensions">FAQ</a>
    155           </li>
    156           <li id="samples_link">
    157             <a href="samples.html" title="Sample extensions (with source code)">Samples</a>
    158           </li>
    159           <li id="group_link">
    160             <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions" title="Google Chrome Extensions developer forum">Group</a>
    161           </li>
    162         </ul>
    163       </div> <!-- end gc-topnav -->
    164 
    165     <div class="g-section g-tpl-170">
    166       <!-- SIDENAV -->
    167       <div class="g-unit g-first" id="gc-toc">
    168         <ul>
    169           <li><a href="getstarted.html">Getting Started</a></li>
    170           <li><a href="overview.html">Overview</a></li>
    171           <li><a href="whats_new.html">What's New?</a></li>
    172           <li><h2><a href="devguide.html">Developer's Guide</a></h2>
    173             <ul>
    174               <li>Browser UI
    175                 <ul>
    176                   <li><a href="browserAction.html">Browser Actions</a></li>
    177                   <li><a href="contextMenus.html">Context Menus</a></li>
    178                   <li><a href="notifications.html">Desktop Notifications</a></li>
    179                   <li><a href="omnibox.html">Omnibox</a></li>
    180                   <li><a href="options.html">Options Pages</a></li>
    181                   <li><a href="override.html">Override Pages</a></li>
    182                   <li><a href="pageAction.html">Page Actions</a></li>
    183                 </ul>
    184               </li>
    185               <li>Browser Interaction
    186                 <ul>
    187                   <li><a href="bookmarks.html">Bookmarks</a></li>
    188                   <li><a href="cookies.html">Cookies</a></li>
    189                   <li><a href="events.html">Events</a></li>
    190                   <li><a href="history.html">History</a></li>
    191                   <li><a href="management.html">Management</a></li>
    192                   <li><a href="tabs.html">Tabs</a></li>
    193                   <li><a href="windows.html">Windows</a></li>
    194                 </ul>
    195               </li>
    196               <li>Implementation
    197                 <ul>
    198                   <li><a href="a11y.html">Accessibility</a></li>
    199                   <li><a href="background_pages.html">Background Pages</a></li>
    200                   <li><a href="content_scripts.html">Content Scripts</a></li>
    201                   <li><a href="xhr.html">Cross-Origin XHR</a></li>
    202                   <li><a href="idle.html">Idle</a></li>
    203                   <li><a href="i18n.html">Internationalization</a></li>
    204                   <li><a href="messaging.html">Message Passing</a></li>
    205                   <li><a href="npapi.html">NPAPI Plugins</a></li>
    206                 </ul>
    207               </li>
    208               <li>Finishing
    209                 <ul>
    210                   <li><a href="hosting.html">Hosting</a></li>
    211                   <li><a href="external_extensions.html">Other Deployment Options</a></li>
    212                 </ul>
    213               </li>
    214             </ul>
    215           </li>
    216           <li><h2><a href="apps.html">Packaged Apps</a></h2></li>
    217           <li><h2><a href="tutorials.html">Tutorials</a></h2>
    218             <ul>
    219               <li><a href="tut_debugging.html">Debugging</a></li>
    220               <li class="leftNavSelected">Google Analytics</li>
    221               <li><a href="tut_oauth.html">OAuth</a></li>
    222             </ul>
    223           </li>
    224           <li><h2>Reference</h2>
    225             <ul>
    226               <li>Formats
    227                 <ul>
    228                   <li><a href="manifest.html">Manifest Files</a></li>
    229                   <li><a href="match_patterns.html">Match Patterns</a></li>
    230                 </ul>
    231               </li>
    232               <li><a href="permission_warnings.html">Permission Warnings</a></li>
    233               <li><a href="api_index.html">chrome.* APIs</a></li>
    234               <li><a href="api_other.html">Other APIs</a></li>
    235             </ul>
    236           </li>
    237           <li><h2><a href="samples.html">Samples</a></h2></li>
    238           <div class="line"> </div>
    239           <li><h2>More</h2>
    240             <ul>
    241               <li><a href="http://code.google.com/chrome/webstore/docs/index.html">Chrome Web Store</a></li>
    242               <li><a href="http://code.google.com/chrome/apps/docs/developers_guide.html">Hosted Apps</a></li>
    243               <li><a href="themes.html">Themes</a></li>
    244             </ul>
    245           </li>
    246         </ul>
    247       </div>
    248       <script>
    249         initToggles();
    250       </script>
    251 
    252     <div class="g-unit" id="gc-pagecontent">
    253       <div id="pageTitle">
    254         <h1 class="page_title">Tutorial: Google Analytics</h1>
    255       </div>
    256         <!-- TABLE OF CONTENTS -->
    257         <div id="toc">
    258           <h2>Contents</h2>
    259           <ol>
    260             <li>
    261               <a href="#toc-requirements">Requirements</a>
    262               <ol>
    263                 <li style="display: none; ">
    264                   <a>h3Name</a>
    265                 </li>
    266               </ol>
    267             </li><li>
    268               <a href="#toc-installing">Installing the tracking code</a>
    269               <ol>
    270                 <li style="display: none; ">
    271                   <a>h3Name</a>
    272                 </li>
    273               </ol>
    274             </li><li>
    275               <a href="#toc-tracking-pageviews">Tracking page views</a>
    276               <ol>
    277                 <li style="display: none; ">
    278                   <a>h3Name</a>
    279                 </li>
    280               </ol>
    281             </li><li>
    282               <a href="#toc-debugging">Monitoring analytics requests</a>
    283               <ol>
    284                 <li style="display: none; ">
    285                   <a>h3Name</a>
    286                 </li>
    287               </ol>
    288             </li><li>
    289               <a href="#toc-tracking-events">Tracking events</a>
    290               <ol>
    291                 <li style="display: none; ">
    292                   <a>h3Name</a>
    293                 </li>
    294               </ol>
    295             </li><li>
    296               <a href="#toc-samplecode">Sample code</a>
    297               <ol>
    298                 <li style="display: none; ">
    299                   <a>h3Name</a>
    300                 </li>
    301               </ol>
    302             </li>
    303               <li style="display: none; ">
    304                 <a href="#apiReference">API reference</a>
    305                 <ol>
    306                   <li>
    307                     <a href="#properties">Properties</a>
    308                     <ol>
    309                       <li>
    310                         <a href="#property-anchor">propertyName</a>
    311                       </li>
    312                     </ol>
    313                   </li>
    314                   <li>
    315                     <a>Methods</a>
    316                     <ol>
    317                       <li>
    318                         <a href="#method-anchor">methodName</a>
    319                       </li>
    320                     </ol>
    321                   </li>
    322                   <li>
    323                     <a>Events</a>
    324                     <ol>
    325                       <li>
    326                         <a href="#event-anchor">eventName</a>
    327                       </li>
    328                     </ol>
    329                   </li>
    330                   <li>
    331                     <a href="#types">Types</a>
    332                     <ol>
    333                       <li>
    334                         <a href="#id-anchor">id</a>
    335                       </li>
    336                     </ol>
    337                   </li>
    338                 </ol>
    339               </li>
    340           </ol>
    341         </div>
    342         <!-- /TABLE OF CONTENTS -->
    343 
    344         <!-- Standard content lead-in for experimental API pages -->
    345         <p id="classSummary" style="display: none; ">
    346           For information on how to use experimental APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
    347         </p>
    348 
    349         <!-- STATIC CONTENT PLACEHOLDER -->
    350         <div id="static"><div id="pageData-name" class="pageData">Tutorial: Google Analytics</div>
    351 <div id="pageData-showTOC" class="pageData">true</div>
    352 
    353 <p>This tutorial demonstrates using Google Analytics to track the usage of your
    354 extension.</p>
    355 
    356 <h2 id="toc-requirements">Requirements</h2>
    357 <p>
    358   This tutorial expects that you have some familiarity writing extensions for
    359   Google Chrome.  If you need information on how to write an extension, please
    360   read the <a href="gettingstarted.html">Getting Started tutorial</a>.
    361 </p>
    362 
    363 <p>
    364   You will also need a <a href="http://www.google.com/analytics">Google
    365   Analytics account</a> set up to track your extension.  Note that when setting
    366   up the account, you can use any value in the Website's URL field, as your
    367   extension will not have an URL of its own.
    368 </p>
    369 
    370 <p style="text-align: center">
    371   <img src="images/tut_analytics/screenshot01.png" style="width:400px;height:82px;" alt="The analytics setup with info for a chrome extension filled out.">
    372 </p>
    373 
    374 <p>
    375   Also note that Google Analytics requires version <strong>4.0.302.2</strong>
    376   of Google Chrome to work correctly.  Users with an earlier version of Google
    377   Chrome will not show up on your Google Analytics reports.  View
    378   <a href="faq.html#faq-dev-14">this FAQ entry</a> to learn how to check which
    379   version of Google Chrome is deployed to which platform.
    380 </p>
    381 
    382 <h2 id="toc-installing">Installing the tracking code</h2>
    383 
    384 <p>
    385   The standard Google Analytics tracking code snippet fetches a file named
    386   <code>ga.js</code> from an SSL protected URL if the current page
    387   was loaded using the <code>https://</code> protocol.  <strong>It is strongly
    388   advised to use the SSL protected ga.js in an extension</strong>,
    389   but Google Chrome extension
    390   pages are hosted under <code>chrome-extension://</code> URLs, so the tracking
    391   snippet must be modified slightly to pull <code>ga.js</code> directly from
    392   <code>https://ssl.google-analytics.com/ga.js</code> instead of the default
    393   location.
    394 </p>
    395 
    396 <p>
    397   Below is a modified snippet for the
    398   <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html">asynchronous
    399   tracking API</a> (the modified line is bolded):
    400 </p>
    401 
    402 <pre>(function() {
    403   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    404   <strong>ga.src = 'https://ssl.google-analytics.com/ga.js';</strong>
    405   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    406 })();
    407 </pre>
    408 
    409 <p>
    410   Here is a background page which loads the asynchronous tracking code and
    411   tracks a single page view:
    412 </p>
    413 
    414 <pre>&lt;!DOCTYPE html&gt;
    415 &lt;html&gt;
    416  &lt;head&gt;
    417    ...
    418  &lt;/head&gt;
    419  &lt;body&gt;
    420    &lt;script&gt;
    421      var _gaq = _gaq || [];
    422      _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
    423      _gaq.push(['_trackPageview']);
    424 
    425      (function() {
    426        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    427        ga.src = 'https://ssl.google-analytics.com/ga.js';
    428        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    429      })();
    430    &lt;/script&gt;
    431 
    432    ...
    433  &lt;/body&gt;
    434 &lt;/html&gt;
    435 </pre>
    436 
    437 <p>
    438   Keep in mind that the string <code>UA-XXXXXXXX-X</code> should be replaced
    439   with your own Google Analytics account number.
    440 </p>
    441 
    442 <h2 id="toc-tracking-pageviews">Tracking page views</h2>
    443 
    444 <p>
    445   The <code>_gaq.push(['_trackPageview']);</code> code will track a single
    446   page view.  This code may be used on any page in your extension.  When
    447   placed on a background page, it will register a view once per browser
    448   session.  When placed on a popup, it will register a view once every time
    449   the popup is opened.
    450 </p>
    451 
    452 <p>
    453   By looking at the page view data for each page in your extension, you can
    454   get an idea of how many times your users interact with your extension per
    455   browser session:
    456 </p>
    457 
    458 <p style="text-align: center">
    459   <img src="images/tut_analytics/screenshot02.png" style="width:300px;height:119px;" alt="Analytics view of the top content for a site.">
    460 </p>
    461 
    462 <h2 id="toc-debugging">Monitoring analytics requests</h2>
    463 
    464 <p>
    465   To ensure that tracking data from your extension is being sent to Google
    466   Analytics, you can inspect the pages of your extension in the
    467   Developer Tools window (see the
    468   <a href="tut_debugging.html">debugging tutorial</a> for more information).
    469   As the following figure shows, you should see requests for a file named
    470   <strong>__utm.gif</strong> if everything is set up correctly.
    471 </p>
    472 
    473 <p style="text-align: center">
    474   <img src="images/tut_analytics/screenshot04.png" style="width:683px;height:418px;" alt="Developer Tools window showing the __utm.gif request">
    475 </p>
    476 
    477 <h2 id="toc-tracking-events">Tracking events</h2>
    478 
    479 <p>
    480   By configuring event tracking, you can determine which parts of your
    481   extension your users interact with the most.  For example, if you have
    482   three buttons users may click:
    483 </p>
    484 
    485 <pre>  &lt;button&gt;Button 1&lt;/button&gt;
    486   &lt;button&gt;Button 2&lt;/button&gt;
    487   &lt;button&gt;Button 3&lt;/button&gt;
    488 </pre>
    489 
    490 <p>
    491   Write a function that sends click events to Google Analytics:
    492 </p>
    493 
    494 <pre>  function trackButton(button_id) {
    495     _gaq.push(['_trackEvent', 'button' + button_id, 'clicked']);
    496   };
    497 </pre>
    498 
    499 <p>
    500   And call it when each button is pressed:
    501 </p>
    502 
    503 <pre>  &lt;button onclick="trackButton(1);"&gt;Button 1&lt;/button&gt;
    504   &lt;button onclick="trackButton(2);"&gt;Button 2&lt;/button&gt;
    505   &lt;button onclick="trackButton(3);"&gt;Button 3&lt;/button&gt;
    506 </pre>
    507 
    508 <p>
    509   The Google Analytics event tracking overview page will give you metrics
    510   regarding how many times each individual button is clicked:
    511 </p>
    512 
    513 <p style="text-align: center">
    514   <img src="images/tut_analytics/screenshot03.png" style="width:300px;height:482px;" alt="Analytics view of the event tracking data for a site.">
    515 </p>
    516 
    517 <p>
    518   By using this approach, you can see which parts of your extension are
    519   under-or-overutilized.  This information can help guide decisions about UI
    520   redesigns or additional functionality to implement.
    521 </p>
    522 
    523 <p>
    524   For more information about using the event tracking API, see the
    525   Google Analytics
    526   <a href="http://code.google.com/apis/analytics/docs/tracking/eventTrackerOverview.html">developer
    527   documentation</a>.
    528 </p>
    529 
    530 <h2 id="toc-samplecode">Sample code</h2>
    531 
    532 <p>
    533   A sample extension that uses these techniques is
    534   available in the Chromium source tree:
    535 </p>
    536 
    537 <blockquote>
    538   <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/analytics/">.../examples/tutorials/analytics/</a>
    539 </blockquote>
    540 <p></p>
    541 </div>
    542 
    543         <!-- API PAGE -->
    544         <div class="apiPage" style="display: none; ">
    545         <a name="apiReference"></a>
    546         <h2>API reference: chrome.apiname </h2>
    547 
    548           <!-- PROPERTIES -->
    549           <div class="apiGroup">
    550             <a name="properties"></a>
    551             <h3 id="properties">Properties</h3>
    552 
    553             <div>
    554               <a></a>
    555               <h4>getLastError</h4>
    556               <div class="summary">
    557                 <!-- Note: intentionally longer 80 columns -->
    558                 <span>chrome.extension</span><span>lastError</span>
    559               </div>
    560               <div>
    561               </div>
    562             </div>
    563 
    564           </div> <!-- /apiGroup -->
    565 
    566           <!-- METHODS -->
    567           <div id="methodsTemplate" class="apiGroup">
    568             <a></a>
    569             <h3>Methods</h3>
    570 
    571             <!-- iterates over all functions -->
    572             <div class="apiItem">
    573               <a></a> <!-- method-anchor -->
    574               <h4>method name</h4>
    575 
    576               <div class="summary"><span>void</span>
    577                   <!-- Note: intentionally longer 80 columns -->
    578                   <span>chrome.module.methodName</span>(<span><span>, </span><span></span>
    579                       <var><span></span></var></span>)</div>
    580 
    581               <div class="description">
    582                 <p class="todo">Undocumented.</p>
    583                 <p>
    584                   A description from the json schema def of the function goes here.
    585                 </p>
    586 
    587                 <!-- PARAMETERS -->
    588                 <h4>Parameters</h4>
    589                 <dl>
    590                   <div>
    591                     <div>
    592                     </div>
    593                   </div>
    594                 </dl>
    595 
    596                 <!-- RETURNS -->
    597                 <h4>Returns</h4>
    598                 <dl>
    599                   <div>
    600                     <div>
    601                     </div>
    602                   </div>
    603                 </dl>
    604 
    605                 <!-- CALLBACK -->
    606                 <div>
    607                   <div>
    608                   <h4>Callback function</h4>
    609                   <p>
    610                     The callback <em>parameter</em> should specify a function
    611                     that looks like this:
    612                   </p>
    613                   <p>
    614                     If you specify the <em>callback</em> parameter, it should
    615                     specify a function that looks like this:
    616                   </p>
    617 
    618                   <!-- Note: intentionally longer 80 columns -->
    619                   <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
    620                   <dl>
    621                     <div>
    622                       <div>
    623                       </div>
    624                     </div>
    625                   </dl>
    626                   </div>
    627                 </div>
    628 
    629                 <!-- MIN_VERSION -->
    630                 <p>
    631                   This function was added in version <b><span></span></b>.
    632                   If you require this function, the manifest key
    633                   <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
    634                   can ensure that your extension won't be run in an earlier browser version.
    635                 </p>
    636               </div> <!-- /description -->
    637 
    638             </div>  <!-- /apiItem -->
    639 
    640           </div>  <!-- /apiGroup -->
    641 
    642           <!-- EVENTS -->
    643           <div id="eventsTemplate" class="apiGroup">
    644             <a></a>
    645             <h3>Events</h3>
    646             <!-- iterates over all events -->
    647             <div class="apiItem">
    648               <a></a>
    649               <h4>event name</h4>
    650 
    651               <div class="summary">
    652                 <!-- Note: intentionally longer 80 columns -->
    653                 <span class="subdued">chrome.bookmarks</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);
    654               </div>
    655 
    656               <div class="description">
    657                 <p class="todo">Undocumented.</p>
    658                 <p>
    659                   A description from the json schema def of the event goes here.
    660                 </p>
    661 
    662                 <!-- PARAMETERS -->
    663                 <div>
    664                   <h4>Parameters</h4>
    665                   <dl>
    666                     <div>
    667                       <div>
    668                       </div>
    669                     </div>
    670                   </dl>
    671                 </div>
    672               </div> <!-- /decription -->
    673 
    674             </div> <!-- /apiItem -->
    675 
    676           </div> <!-- /apiGroup -->
    677 
    678           <!-- TYPES -->
    679           <div class="apiGroup">
    680             <a name="types"></a>
    681             <h3 id="types">Types</h3>
    682 
    683             <!-- iterates over all types -->
    684             <div class="apiItem">
    685               <a></a>
    686               <h4>type name</h4>
    687 
    688               <div>
    689               </div>
    690 
    691             </div> <!-- /apiItem -->
    692 
    693           </div> <!-- /apiGroup -->
    694 
    695         </div> <!-- /apiPage -->
    696       </div> <!-- /gc-pagecontent -->
    697     </div> <!-- /g-section -->
    698   </div> <!-- /codesiteContent -->
    699     <div id="gc-footer" --="">
    700       <div class="text">
    701   <p>
    702   Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>,
    703   the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons
    704   Attribution 3.0 License</a>, and code samples are licensed under the
    705   <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>.
    706   </p>
    707   <p>
    708   2011 Google
    709   </p>
    710 
    711 <!-- begin analytics -->
    712 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
    713 <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
    714 
    715 <script type="text/javascript">
    716   // chrome doc tracking
    717   try {
    718     var engdocs = _gat._getTracker("YT-10763712-2");
    719     engdocs._trackPageview();
    720   } catch(err) {}
    721 
    722   // code.google.com site-wide tracking
    723   try {
    724     _uacct="UA-18071-1";
    725     _uanchor=1;
    726     _uff=0;
    727     urchinTracker();
    728   }
    729   catch(e) {/* urchinTracker not available. */}
    730 </script>
    731 <!-- end analytics -->
    732       </div>
    733     </div> <!-- /gc-footer -->
    734   </div> <!-- /gc-container -->
    735 </body></html>
    736