Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MasterEnoc
Copy link
Contributor

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:
image

@MasterEnoc MasterEnoc requested a review from a team as a code owner June 24, 2021 06:31
Comment on lines 212 to 213
# Only ask for consent once per browser session
Cookies.set('analyticsConsentAsked', '1')
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@@ -11,6 +11,7 @@
try @initErrorTracking() catch
return unless @browserCheck()

@showAnaliticsOne = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be analiticsAlreadyShown?

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants