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),