Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Implement opt-in analytics with cookie bar #1906

Merged
merged 36 commits into from
May 18, 2018
Merged

Conversation

lukebarnard1
Copy link
Contributor

No description provided.

@@ -353,7 +354,9 @@ const LoggedInView = React.createClass({

let topBar;
const isGuest = this.props.matrixClient.isGuest();
if (this.props.hasNewVersion) {
if (this.props.showCookieBar) {
topBar = <CookieBar />;
Copy link
Member

Choose a reason for hiding this comment

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

Annoying that this will prevent the display of the password nag bar. I don't have a fix to suggest for this though, :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not showing it until the cookie bar is dismissed doesn't seem like the end of the world.

supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
displayName: _td('Show cookie bar'),
default: true,
},
Copy link
Member

Choose a reason for hiding this comment

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

Will this give us a separate settings toggle saying, "Show cookies bar"? Either way, don't we just need to show it if analyticsOptIn === null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will. I'll try and remove it but keep it as a setting.

@@ -227,8 +229,6 @@ export default React.createClass({
componentWillMount: function() {
SdkConfig.put(this.props.config);

if (!SettingsStore.getValue("analyticsOptOut")) Analytics.enable();
Copy link
Member

Choose a reason for hiding this comment

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

Are we deliberately re-prompting people who've already opted out? Might be nice to propagate the old analyticsOptOut to analyticsOptIn.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, everyone needs to see the cookie bar. This just gives them a chance to make the decision again if they've already made it.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, fair enough.

@dbkr dbkr assigned lukebarnard1 and unassigned dbkr May 15, 2018
@lukebarnard1 lukebarnard1 assigned dbkr and unassigned lukebarnard1 May 15, 2018
@@ -213,11 +213,15 @@ export const SETTINGS = {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
default: "en",
},
"analyticsOptOut": {
"analyticsOptIn": {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
Copy link
Member

Choose a reason for hiding this comment

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

Something to consider may be to prevent the configuration from setting this flag. WITH_CONFIG means the config.json is able to set a default value that overrides this.

There are arguments for both keeping and ditching the config-level option, just thought I'd point it out.

Copy link
Member

Choose a reason for hiding this comment

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

likewise on the cookie bar

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 is as intended, allowing config.json to override both seems like a legitimate use case.

<a
className="mx_MatrixToolbar_link"
target="_blank"
href="https://riot.im/privacy"
Copy link
Member

Choose a reason for hiding this comment

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

config.json option please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, absolutely.

lukebarnard1 and others added 4 commits May 15, 2018 15:54
@dbkr
Copy link
Member

dbkr commented May 16, 2018

What's the status with the 'show cookie bar' setting? I'm not sure I really understand why this is a thing.

@dbkr dbkr assigned lukebarnard1 and unassigned dbkr May 16, 2018
@lukebarnard1
Copy link
Contributor Author

lukebarnard1 commented May 16, 2018

What's the status with the 'show cookie bar' setting? I'm not sure I really understand why this is a thing.

It was a convenient way to add a flag that was tracked in local storage and in config. Some deploys might want to disable the cookie bar (maybe they already have a cookie warning somewhere else).

(Also, no need to re-assign for a response on a comment)

@lukebarnard1 lukebarnard1 removed their assignment May 16, 2018
@dbkr
Copy link
Member

dbkr commented May 18, 2018

Right, I think I understand the reasoning behind this now, in that what I was missing was:

  • It doesn't display a 'show cookie bar' setting because you have to add it in the UserSettings component for that to happen
  • We're linking to the cookie policy in the bar to give people info on what cookies we set, aside from just analytics.

@dbkr dbkr merged commit 5952de7 into develop May 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants