0c0w3 / enhanced-tracking-protection-study

A study that examines the impact of enhanced tracking protection on search volume, in two separate cohorts.
Mozilla Public License 2.0
2 stars 1 forks source link

Send Pocket a specific user agent #1

Open TanviHacks opened 5 years ago

TanviHacks commented 5 years ago

In order for pocket to measure the revenue impact of blocking tracking cookies from the basic list, they can compare the control branch from the testing branch in this study. To identify users who are in the control vs testing branch, we can overwrite the user agent string for requests to pocket.com and getpocket.com indicating which branch a user is coming from. To do this we need to:

On install, set prefs general.useragent.override.getpocket.com and general.useragent.override.pocket.com to have value "Mozilla/5.0 Gecko/20100101 Firefox Branch1" for the Control Branch. And set general.useragent.override.getpocket.com and general.useragent.override.pocket.com to have value "Mozilla/5.0 Gecko/20100101 Firefox Branch2" for the Testing Branch. On uninstall, delete the prefs.

TanviHacks commented 5 years ago

I am unclear on a couple of items.

1) Mozilla/5.0 Gecko/20100101 Firefox BranchX a reasonable value for the user agent string? Should "Branch1" instead just be 1 or Branch1? 2) If a user (or an addon a user has installed) sets general.useragent.override, will it override the pocket specific user agents? If not, then no worries. If it does, should we filter out users who have this pref set from the study?

TanviHacks commented 5 years ago

I can answer part of question 2 - If a user sets general.useragent.override, will it override the pocket specific user agents? It will not override the pocket specific user agent string. The pocket pref will take precedence.

We still need to find out what happens if an addon changes the user agent string.

TanviHacks commented 5 years ago

A few folks met today and we worked out some details.

Lets change the prefs to these values: Control Branch: "Mozilla/5.0 Gecko/20100101 Firefox Study-ETP-Off" Testing Branch: "Mozilla/5.0 Gecko/20100101 Firefox Study-ETP-On"

This answers question 1 above. I just need to work out the consequences for users who have a user agent spoofer extension installed. Chances are the number of users is low enough to not effect our results.

Thanks!