Permalink
Browse files

DRY up Google Analytics tracker and move the site id into xtt.yml

  • Loading branch information...
johndouthat committed May 10, 2009
1 parent c8660c9 commit 5e934401703c0491234148879cbc1512c1a329bc
@@ -65,15 +65,7 @@
</div>
<!-- /wrapper -->
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-3465274-3");
-pageTracker._initData();
-pageTracker._trackPageview();
-</script>
+ <%= render :partial => 'layouts/google_analytics' %>
</body>
</html>
@@ -42,14 +42,6 @@
</div>
</div>
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("UA-3465274-3");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
+ <%= render :partial => 'layouts/google_analytics' %>
</body>
</html>
@@ -47,14 +47,6 @@
</div>
<!-- /wrapper -->
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-3465274-3");
-pageTracker._initData();
-pageTracker._trackPageview();
-</script>
+<%= render :partial => 'layouts/google_analytics' %>
</body>
</html>
@@ -23,14 +23,6 @@
</div>
</div>
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("UA-3465274-3");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
+<%= render :partial => 'layouts/google_analytics' %>
</body>
</html>
View
@@ -6,3 +6,4 @@ aim_admin: courtenay187
aim_send_errors: true
secret: SEKRIT
excetion_notification_email: tt.error@entp.com
+google_analytics_site_id: UA-3465274-3

0 comments on commit 5e93440

Please sign in to comment.