-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Avoid showing analitics notification more than once #1581
base: main
Are you sure you want to change the base?
Conversation
# Only ask for consent once per browser session | ||
Cookies.set('analyticsConsentAsked', '1') |
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.
How does your change relate to those two lines? You to tackle the same problem.
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.
This line avoids show me more than once the analitics consent when cookies are enabled, In my case I do not accept neither the devdocs cookie nor the analitics, thus this line does not fix the problem.
assets/javascripts/app/app.coffee
Outdated
@@ -11,6 +11,7 @@ | |||
try @initErrorTracking() catch | |||
return unless @browserCheck() | |||
|
|||
@showAnaliticsOne = false |
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.
Should this be analiticsAlreadyShown
?
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.
Fixed, should be fine now.
I usually do not accept cookies in any website and I didn't accept cookies in Devdocs. Devdocs can be really intrusive to show a notifications telling me to accept analytics each time I click a page, this is a silly behavior so I change it to only show one time the analytics notification during each Devdocs session.
I also notice that the cookies and the analytics notifications didn't hide automatically thus I added two seconds to hide them automatically.
Look at the following image showing the notifications generated by devdocs when I did not accept the cookies: