* VRFS-695 - GA integrated trivially for all 3 environments
This commit is contained in:
parent
6c3958dc9f
commit
5bbea091bb
|
|
@ -38,5 +38,6 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<%= yield %>
|
||||
<%= render "shared/ga" %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -17,5 +17,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
<%= render "shared/ga" %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -54,5 +54,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "shared/ga" %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
<%= render "clients/footer" %>
|
||||
</div>
|
||||
|
||||
<%= render "shared/ga" %>
|
||||
<!-- version info: <%= version %> -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<% if current_user.nil? || !current_user.admin? # remove admin users from GA %>
|
||||
<script>
|
||||
(function(context) {
|
||||
if(context.jamClient) {
|
||||
var currentVersion = context.jamClient.ClientUpdateVersion();
|
||||
|
||||
if(currentVersion == null || currentVersion.indexOf("Compiled") > -1) {
|
||||
// don't track dev version of the client
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
<% if Rails.env == "development" %>
|
||||
ga('create', '<%= Rails.application.config.ga_ua %>', { 'cookieDomain': 'none' });
|
||||
<% else %>
|
||||
ga('create', '<%= Rails.application.config.ga_ua %>', 'jamkazam.com');
|
||||
<% end %>
|
||||
|
||||
ga('send', 'pageview');
|
||||
})(window);
|
||||
</script>
|
||||
<% end %>
|
||||
|
|
@ -151,5 +151,7 @@ if defined?(Bundler)
|
|||
|
||||
config.bugsnag_key = "4289fc981c8ce3eb0969003c4f498b01"
|
||||
config.bugsnag_notify_release_stages = ["production"] # add 'development' if you want to test a bugsnag feature locally
|
||||
|
||||
config.ga_ua = 'UA-44184562-2' # google analytics
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue