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

Non-referral downloads should use generic refcode #2547

Closed
davidtemkin opened this issue Dec 13, 2018 · 17 comments · Fixed by brave/brave-core#1982
Closed

Non-referral downloads should use generic refcode #2547

davidtemkin opened this issue Dec 13, 2018 · 17 comments · Fixed by brave/brave-core#1982

Comments

@davidtemkin
Copy link

Currently, only versions of Brave that have been downloaded with a refcode (as encoded in the installer's filename) will (a) call referral server endpoints immediately and at 30 days, and (b) will include the refcode in update pings for the first 90 days of usage.

This change will add an implicit, default refcode for all downloads, even those not downloaded via referral links.

Here's the change: All Brave browsers should add a universal "default" Brave refcode into the user profile at first run time (if not already present from a referral download/installation process) and act from that moment forward exactly as any referred download would act.

This will give us apples-to-apples data that will allow us to diagnose potential problems with both "organic" and referred installs.

Stay tuned for the actual default refcode to use.

This change needs to be released in .58.x

@mandar-brave
Copy link

@anthonypkeane to follow up for Mobile as well - not a high priority immediately.

@anthonypkeane
Copy link

@jhreis @SergeyZhukovsky Pls add this to the list of to-dos

@diracdeltas
Copy link
Member

diracdeltas commented Dec 13, 2018

In case it wasn't clear, we should not do IP or other types of anti-fraud logging for general referrals. (Basically any download not from a referral promo)

@bbondy bbondy added this to the 1.x Backlog milestone Dec 13, 2018
@bbondy bbondy added the priority/P2 A bad problem. We might uplift this to the next planned release. label Dec 13, 2018
@aekeus
Copy link
Member

aekeus commented Dec 13, 2018

@diracdeltas are you ok with keeping the current behaviour of storing the geo-coded country for downloads and installations using the new default refcode?

@diracdeltas
Copy link
Member

diracdeltas commented Dec 13, 2018

@aekeus do you mean the current behavior for referral promo builds is to log geo-coded country for each referral download? is the country logged alongside any other information (like IP)?

@aekeus
Copy link
Member

aekeus commented Dec 13, 2018

@diracdeltas ip is not stored, it is geo-coded and the ip address discarded.

@diracdeltas
Copy link
Member

if the effect is just "Brave sees country code of all downloads/installs (unlinked to any other data except the user's referral code)" i think that is not necessary to remove, but if it's not needed, it should probably be removed.

my general concern is we may want to add more anti-fraud checks in the future for referral promo users that we don't want for regular users, so it might make sense to distinguish between the two from the start.

@aekeus
Copy link
Member

aekeus commented Dec 13, 2018

@diracdeltas ok that makes sense. Would it be better if we removed all info from the iptags JSON blob except country for the default refcode case?

@davidtemkin
Copy link
Author

country is needed for reasons other than anti-fraud.

good point on being careful wrt on any future anti-fraud measures related to referrals.

@diracdeltas
Copy link
Member

diracdeltas commented Dec 13, 2018

Would it be better if we removed all info from the iptags JSON blob except country for the default refcode case?

sgtm

should/can we also do this for non-default refcodes which are not from referrer promos? (like downloads via co-installers or ad campaigns, which i believe will also use refcodes)

@aekeus
Copy link
Member

aekeus commented Dec 13, 2018

@diracdeltas yes, country is the only identifier required. We should remove the rest on all downloads. Will update the linked issue.

@rebron
Copy link
Collaborator

rebron commented Apr 1, 2019

cc: @anthonypkeane

@btlechowski
Copy link

btlechowski commented May 27, 2019

Verification passed on

Brave 0.65.107 Chromium: 75.0.3770.38 (Official Build) beta (64-bit)
Revision 3860105745f2b12537da9e9f048f14c3f52ba970-refs/branch-heads/3770@{#618}
OS Windows 10 OS Version 1803 (Build 17134.523)

Used test plan from brave/brave-core#1982
Verified BRV001 is the generic ref code.
Checked that normal ref codes still work.
Logged #4619

image
image

@srirambv
Copy link
Contributor

Marking as Windows and macOS only as referrals are not available on Linux

@davidtemkin
Copy link
Author

I think we do want the generic referral code reporting on Linux -- the intent here is to measure our organic download usage, and that does not involve the download/install refcode mechanism. It only requires that the generic "organic" refocode be put into the update pings. (In effect, this will mean all Linux builds will use this one refcode). @srirambv

@btlechowski
Copy link

btlechowski commented May 29, 2019

Removed OS/Windows and OS/macOS labels based on the above comment

@srirambv
Copy link
Contributor

srirambv commented May 29, 2019

Verified on new profile and it shows the default ref code. Existing profiles doesn't show it. Marking it as passed on

Brave 0.65.112 Chromium: 75.0.3770.38 (Official Build) beta (64-bit)
Revision 3860105745f2b12537da9e9f048f14c3f52ba970-refs/branch-heads/3770@{#618}
OS Linux

image

Verification passed on

Brave 0.65.113 Chromium: 75.0.3770.38 (Official Build) beta (64-bit)
Revision 3860105745f2b12537da9e9f048f14c3f52ba970-refs/branch-heads/3770@{#618}
OS Windows 10 OS Version 1803 (Build 17134.523)

Fiddler- Default Ref code BRV001
image

Local state file - Default Ref code BRV001

image

Verified passed with

Brave 0.65.114 Chromium: 75.0.3770.38 (Official Build) (64-bit)
Revision 3860105745f2b12537da9e9f048f14c3f52ba970-refs/branch-heads/3770@{#618}
OS Mac OS X
  • Verified test plan from Non-referral downloads should use generic refcode brave-core#1982
  • Verified default promo code when downloaded from Brave-Browser.dmg and Brave-Browser.pkg in brave://local-state.
    Screen Shot 2019-05-30 at 4 00 04 PM
  • Verified daily ping uses default promo code (launched via terminal with --enable-logging=stderr --v=1 to verify):
    [27886:775:0530/155540.104333:VERBOSE1:brave_stats_updater.cc(157)] Brave stats ping, url: https://laptop-updates.brave.com/1/usage/brave-core?platform=osx-bc&channel=release&version=0.65.114&daily=true&weekly=true&monthly=true&first=true&woi=2019-05-27&ref=BRV001
  • Verified downloading Brave-Browser-RED194.pkg and Brave-Browser-dowjones-barrons.pkg both show the expected promo code in local-state and in daily ping:
    [27687:775:0530/154104.472617:VERBOSE1:brave_stats_updater.cc(157)] Brave stats ping, url: https://laptop-updates.brave.com/1/usage/brave-core?platform=osx-bc&channel=release&version=0.65.114&daily=true&weekly=true&monthly=true&first=true&woi=2019-05-27&ref=RED194
    [27761:775:0530/154452.553237:VERBOSE1:brave_stats_updater.cc(157)] Brave stats ping, url: https://laptop-updates.brave.com/1/usage/brave-core?platform=osx-bc&channel=release&version=0.65.114&daily=true&weekly=true&monthly=true&first=true&woi=2019-05-27&ref=dowjones-barrons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment