Commits

Branko Vukelic committed 7140f62

Fixed wrong logic for untracking superuser

Comments (0)

Files changed (3)

ga_tracking/context_processors.py

     return dict(
         GA_TRACKING_ID=settings.GA_TRACKING_ID,
         GA_DOMAIN=settings.GA_DOMAIN,
-        GA_USER_TRACKABLE=settings.GA_TRACK_SUPERUSER and is_super
+        GA_USER_UNTRACKABLE=(not settings.GA_TRACK_SUPERUSER) and is_super
     )

ga_tracking/templates/ga_tracking/ga.html

-{% if GA_TRACKING_ID and GA_USER_TRACKABLE %}
+{% if GA_TRACKING_ID and not GA_USER_UNTRACKABLE %}
 <script type="text/javascript">
 
     var _gaq = _gaq || [];

ga_tracking/templates/ga_tracking/ga_new.html

-{% if GA_TRACKING_ID and GA_DOMAIN and GA_USER_TRACKABLE %}
+{% if GA_TRACKING_ID and GA_DOMAIN and not GA_USER_UNTRACKABLE %}
 <script>
     (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),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.