diff options
author | kurrik@chromium.org <kurrik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-15 01:42:11 +0000 |
---|---|---|
committer | kurrik@chromium.org <kurrik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-15 01:42:11 +0000 |
commit | d797e5a0f114ebbd0b7962c09678fb2b7219ad1e (patch) | |
tree | 5a0618a208123ebca722bc5c5281b2c185b4eb5d /chrome/common/extensions/docs/tut_analytics.html | |
parent | 1dd52964ca4288e96b7b5bdbb146dffcadc57e04 (diff) | |
download | chromium_src-d797e5a0f114ebbd0b7962c09678fb2b7219ad1e.zip chromium_src-d797e5a0f114ebbd0b7962c09678fb2b7219ad1e.tar.gz chromium_src-d797e5a0f114ebbd0b7962c09678fb2b7219ad1e.tar.bz2 |
Analytics tutorial updates
Updated analytics tutorial with new tracking code as well as more information about debugging requests.
TEST=None
BUG=None
Review URL: http://codereview.chromium.org/1880001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47353 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/tut_analytics.html')
-rw-r--r-- | chrome/common/extensions/docs/tut_analytics.html | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/chrome/common/extensions/docs/tut_analytics.html b/chrome/common/extensions/docs/tut_analytics.html index 3baa8a4..e1d56b5 100644 --- a/chrome/common/extensions/docs/tut_analytics.html +++ b/chrome/common/extensions/docs/tut_analytics.html @@ -223,6 +223,13 @@ </li> </ol> </li><li> + <a href="#toc-debugging">Monitoring analytics requests</a> + <ol> + <li style="display: none; "> + <a>h3Name</a> + </li> + </ol> + </li><li> <a href="#toc-tracking-events">Tracking events</a> <ol> <li style="display: none; "> @@ -334,7 +341,7 @@ extension.</p> <pre>(function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; <strong>ga.src = 'https://ssl.google-analytics.com/ga.js';</strong> - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga); + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </pre> @@ -357,7 +364,7 @@ extension.</p> (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = 'https://ssl.google-analytics.com/ga.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga); + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> @@ -391,6 +398,21 @@ extension.</p> <img src="images/tut_analytics/screenshot02.png" style="width:300px;height:119px;" alt="Analytics view of the top content for a site."> </p> +<h2 id="toc-debugging">Monitoring analytics requests</h2> + +<p> + To ensure that tracking data from your extension is being sent to Google + Analytics, you can inspect the pages of your extension in the + Developer Tools window (see the + <a href="tut_debugging.html">debugging tutorial</a> for more information). + As the following figure shows, you should see requests for a file named + <strong>__utm.gif</strong> if everything is set up correctly. +</p> + +<p style="text-align: center"> + <img src="images/tut_analytics/screenshot04.png" style="width:683px;height:418px;" alt="Developer Tools window showing the __utm.gif request"> +</p> + <h2 id="toc-tracking-events">Tracking events</h2> <p> |