Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed google analytics bug

Fixed a bug where the tracking on google analytics was tracking heroku traffic.
  • Loading branch information...
commit 2f1e60925b18fdba2eca13f23000e5137cc1bad6 1 parent a8ba4a0
@kcalmes kcalmes authored
Showing with 20 additions and 13 deletions.
  1. +20 −13 app/views/layouts/application.html.erb
View
33 app/views/layouts/application.html.erb
@@ -3,8 +3,8 @@
<head>
<title>Internships</title>
<%= stylesheet_link_tag "all" %>
- <%= stylesheet_link_tag "autoSuggest.css" %>
-
+ <%= stylesheet_link_tag "autoSuggest.css" %>
+ <link rel="stylesheet" href="/javascripts/chosen/chosen.css" />
<% if params[:action] =="myguide" %>
<link rel="stylesheet" href="/myguide_asset/css/reset.css" />
<link rel="stylesheet" href="/myguide_asset/css/text.css" />
@@ -15,8 +15,9 @@
<%= javascript_include_tag "jquery.min.js", "jquery-ui.min.js" %>
<%= javascript_include_tag "DataTables/jquery.dataTables.min.js", "jquery.uniform.js","tinyeditor/tiny_mce.js","jquery.autoSuggest.js" %>
+
<%= javascript_include_tag "rails.js" %>
- <%= javascript_include_tag "application.js" %>
+
<% if params[:action] =="myguide" %>
<script src="/myguide_asset/js/jquery-1.5.1.min.js" type="text/javascript"></script>
@@ -24,22 +25,28 @@
<script src="/myguide_asset/js/data.js" type="text/javascript"></script>
<script src="/myguide_asset/js/application.js" type="text/javascript"></script>
<% end %>
+
+ <%= javascript_include_tag "chosen/chosen.jquery.js" %>
+ <%= javascript_include_tag "application.js" %>
<%= csrf_meta_tag %>
- <script type="text/javascript">
+ <!-- <%= request.host %> -->
+ <% if request.host == 'sap.byu.edu' %>
+ <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-27027970-1']);
- _gaq.push(['_trackPageview']);
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-27027970-1']);
+ _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);
- })();
+ (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>
+ </script>
+ <% end %>
</head>
<body orient="portrait" style="min-height: 420px; min-width: 320px;">
<div id="wrapper">
Please sign in to comment.
Something went wrong with that request. Please try again.