Permalink
Browse files

Adding google analytics tracking

  • Loading branch information...
1 parent 1b475f9 commit 04424a4a107b85592c2b0fdbf410102d104b5080 @cezarsa committed Jun 22, 2012
Showing with 13 additions and 0 deletions.
  1. +2 −0 background.html
  2. +9 −0 lib/analytics.js
  3. +2 −0 lib/popup/final_init.js
View
@@ -34,5 +34,7 @@
<script src="lib/locales.js"></script>
<script src="lib/tweet_manager.js"></script>
+
+<script src="lib/analytics.js"></script>
</body>
</html>
View
@@ -0,0 +1,9 @@
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-32852836-1']);
+_gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = 'https://ssl.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
View
@@ -263,6 +263,8 @@ function initializeWorkspace() {
loadTrends();
ImageUpload.init();
+
+ backgroundPage._gaq.push(['_trackPageview', 'popup.html']);
}, 0);
}

0 comments on commit 04424a4

Please sign in to comment.