summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/static/tut_analytics.html
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions/docs/static/tut_analytics.html')
-rw-r--r--chrome/common/extensions/docs/static/tut_analytics.html21
1 files changed, 19 insertions, 2 deletions
diff --git a/chrome/common/extensions/docs/static/tut_analytics.html b/chrome/common/extensions/docs/static/tut_analytics.html
index aa3bd5f..7cecf51 100644
--- a/chrome/common/extensions/docs/static/tut_analytics.html
+++ b/chrome/common/extensions/docs/static/tut_analytics.html
@@ -56,7 +56,7 @@ extension.</p>
(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>
@@ -80,7 +80,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);
})();
&lt;/script>
@@ -116,6 +116,23 @@ extension.</p>
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>