-
-
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,7 +200,9 @@ page.track = (fn) -> | |
|
||
track = -> | ||
return unless app.config.env == 'production' | ||
return if app.analiticsAlreadyShown | ||
|
||
app.analiticsAlreadyShown = true | ||
consentGiven = Cookies.get('analyticsConsent') | ||
consentAsked = Cookies.get('analyticsConsentAsked') | ||
|
||
|
@@ -210,7 +212,7 @@ track = -> | |
# Only ask for consent once per browser session | ||
Cookies.set('analyticsConsentAsked', '1') | ||
Comment on lines
214
to
215
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
|
||
new app.views.Notif 'AnalyticsConsent', autoHide: null | ||
new app.views.Notif 'AnalyticsConsent', autoHide: 2000 | ||
return | ||
|
||
@resetAnalytics = -> | ||
|
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.