Permalink
Browse files

Added analytics in <head>

  • Loading branch information...
1 parent 7dd3bf3 commit e15fd2127ce8193d4d0b6b6673c2470175df9252 @carmi committed Dec 3, 2011
Showing with 9 additions and 1 deletion.
  1. +6 −0 layouts/analytics.haml
  2. +2 −1 layouts/base.html
  3. +1 −0 layouts/head_analytics.haml
@@ -7,3 +7,9 @@ mpq.push(["init", "05f2dc7b5c19912ef9a0afa018d0f1f2"]);
<!-- End Mixpanel -->
<!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.joyeurs.com/" : "http://piwik.joyeurs.com/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script><script type="text/javascript"> try { var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 2); piwikTracker.trackPageView(); piwikTracker.enableLinkTracking(); } catch( err ) {} </script><noscript><p><img src="http://piwik.joyeurs.com/piwik.php?idsite=2" style="border:0" alt="" /></p></noscript> <!-- End Piwik Tracking Code -->
+
+- if (@item.path == '/writing/google-internship/')
+ \ <script src="http://j.clickdensity.com/cr.js" type="text/javascript"></script>
+ \ <script type="text/javascript">
+ \ //<![CDATA[ var clickdensity_keyElement = 'kvalue'; //]]>
+ \ </script>
View
@@ -18,10 +18,11 @@
- elsif @item[:kind] == 'article'
%meta{:name => "description", :content => "#{@item[:summary]}"}
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ = render 'head_analytics'
%body
= yield
+
= render 'analytics'
@@ -0,0 +1 @@
+<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-27458554-1']); _gaq.push(['_setDomainName', 'ecarmi.org']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>

0 comments on commit e15fd21

Please sign in to comment.