diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-10-18 15:46:48 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-10-18 16:17:06 +1100 |
commit | d0017b0aacf4036fd368a28c7f620d841fc6e71f (patch) | |
tree | f16201a7976dfe9aadd22b8f8c11d0bc104273ff | |
parent | 90711965871118d88cc934a0e33d5311f5ab3f37 (diff) |
Only show google analytics if you are either not logged in or a normal user (not a superuser)
-rw-r--r-- | app/views/layouts/default.rhtml | 2 | ||||
-rw-r--r-- | config/general.yml-example | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 0dd493fd0..7b4c0f6a1 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -139,7 +139,7 @@ <input type="text"> </div> <% - unless Configuration::ga_code.empty? %> + unless Configuration::ga_code.empty? || (@user && @user.super?) %> <script> 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")); diff --git a/config/general.yml-example b/config/general.yml-example index 9646e45c8..1b30ffce6 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -160,7 +160,7 @@ MAX_REQUESTS_PER_USER_PER_DAY: 6 # unset if you aren't running behind varnish VARNISH_HOST: localhost -# Adding a value here will enable Google Analytics on all non-admin pages. +# Adding a value here will enable Google Analytics on all non-admin pages for non-admin users. GA_CODE: '' # If you want to override *all* the public body request emails with your own |