Permalink
Browse files

AddThis and Google Analytics

  • Loading branch information...
1 parent 9c477cd commit 39ebfb087d841425df10bdcd42adfcadccfd8344 @snoyberg committed Oct 5, 2010
Showing with 23 additions and 0 deletions.
  1. +1 −0 Haskellers.hs
  2. +12 −0 hamlet/default-layout.hamlet
  3. +10 −0 julius/analytics.julius
View
@@ -80,6 +80,7 @@ instance Yesod Haskellers where
pc <- widgetToPageContent $ do
widget
addStyle $(Settings.cassiusFile "default-layout")
+ addScript $(Settings.juliusFile "analytics")
hamletToRepHtml $(Settings.hamletFile "default-layout")
-- This is done to provide an optimization for serving static files from
@@ -12,3 +12,15 @@
$maybe mmsg msg
#message $msg$
^pageBody.pc^
+ <!-- AddThis Button BEGIN -->
+ <div class="addthis_toolbox addthis_default_style">
+ <a href="http://www.addthis.com/bookmark.php?v=250&amp;username=snoyberg" class="addthis_button_compact">Share</a>
+ <span class="addthis_separator">|</span>
+ <a class="addthis_button_preferred_1"></a>
+ <a class="addthis_button_preferred_2"></a>
+ <a class="addthis_button_preferred_3"></a>
+ <a class="addthis_button_preferred_4"></a>
+ </div>
+ <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=snoyberg"></script>
+ <!-- AddThis Button END -->
View
@@ -0,0 +1,10 @@
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-1434510-17']);
+_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);
+})();
+

0 comments on commit 39ebfb0

Please sign in to comment.