https://superset.wikimedia.org/r/310
We would like to know the number of logged-in users that have opted out from the desktop improvements projects from the beginning of the deployments on the test wikis (target is less than 40%)
Report on the percentage of logged-in users that have opted out from the new version of vector:
Data comes from the PrefUpdate table, which records preference changes for registered users.
Due to the issue of accidental opt-ins/opt-outs, we will have to only consider the percentage of opt-outs after the date of deployment on each wiki as listed below:
euwiki: Jul 22nd (Default Skin Version: 2)
frwikitionary: (Default Skin Version: 2)
officewiki: (Default Skin Version: 2)
ptwikiversity: (Default Skin Version: 2)
fawiki: July 28 2020 (Default Skin Version: 1)
frwiki: Aug 5 2020(Default Skin Version: 1)
hewiki: July 28 2020(Default Skin Version: 1)
PrefUpdateBugs:
As a result, we will use the event.value field to determine the opt-out rate. event.value = 1 "legacy vector", event.value = 2 "modern vector". The below table what the default is for each wiki: https://docs.google.com/spreadsheets/d/1svlRDsYjOhjXkIV1a-DqLYTcLIFuYoc6pHHz8_VmQcc/edit#gid=625518477
Note: Data reflects total number of opt-outs so this will include any users that might have opt-out multiple times.
#Opt-Out rate based on deployment dates on each wiki
query<- "SELECT
wiki,
event.bucketedUserEditCount AS user_edit_bucket,
Count(*) AS n_opt
FROM event.prefupdate
WHERE
event.property = 'VectorSkinVersion' AND
year = 2020 and month >= 07 AND
((wiki = 'euwiki' AND event.savetimestamp >= '20200728' ) OR
(wiki = 'frwikitionary' AND event.savetimestamp >= '20200728') OR
(wiki = 'officewiki' AND event.savetimestamp >= '20200728') OR
(wiki = 'ptwikiversity' AND event.savetimestamp >= '20200728' ) OR
(wiki = 'fawiki' AND event.savetimestamp >= '20200728') OR
(wiki = 'frwiki' AND event.savetimestamp >= '20200728') OR
(wiki = 'hewiki' AND event.savetimestamp >='20200728' )) AND
event.value = '"1"'
GROUP BY wiki, event.bucketedUserEditCount"
Pending resolution of PrefUpdate issues, we will use the user properties table to identify the total number of users with each vector skin preference set.
query='''
SELECT
up_value AS skin,
COUNT(*) AS users
FROM user_properties
WHERE up_user in ({users})
AND up_property = "skin"
GROUP BY up_value
'''