Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Nov 27, 2011
biodegabriel Load Google Analytics script only in production mode. d1dc956
Commits on Jan 27, 2012
@khelben Merge pull request #6 from gbrl/master
Load Google Analytics script only in production mode.
184e2eb
Showing with 12 additions and 1 deletion.
  1. +12 −1 index.html.patch
View
13 index.html.patch
@@ -55,5 +55,16 @@
- <script defer src="js/script.js"></script>
+ <%%= javascript_include_tag "application" %>
<!-- end scripts -->
-
+
++ <% if ENV['RAILS_ENV'] == 'production' %>
+ <!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
+ mathiasbynens.be/notes/async-analytics-snippet -->
+ <script>
+ var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
+ (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
+ g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
+ s.parentNode.insertBefore(g,s)}(document,'script'));
+ </script>
++ <% end %>
+

No commit comments for this range

Something went wrong with that request. Please try again.