-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding exception for staff user for analytics #5
Adding exception for staff user for analytics #5
Conversation
…henticated_staff_user' into GP2-3054_GA360_exception_for_authenticated_staff_user # Conflicts: # tests/test_mixins.py
great_components/mixins.py
Outdated
@@ -75,6 +75,6 @@ def get_context_data(self, *args, **kwargs): | |||
user = helpers.get_user(self.request) | |||
is_logged_in = helpers.get_is_authenticated(self.request) | |||
self.ga360_payload['login_status'] = is_logged_in | |||
self.ga360_payload['user_id'] = user.hashed_uuid if is_logged_in else None | |||
self.ga360_payload['user_id'] = user.hashed_uuid if (is_logged_in and not user.is_staff) else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean I can't be a staff user and a business user ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can but for staff users, we are just adding user_id to None
for google analytics as I dont think we should record staff visit to GA
This will resolve the issue while admin user not have UUID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok @depsiatwal amended for admin users only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
To do (delete all that do not apply):