Referrals have been a great growth tool for our app. We leverage the Google play store’s install referrer to attribute the installs. For those who are not familiar with this functionality, you can read up on it here. However, the google play store doesn’t exist in China! As a member of the China team, one of my primary objectives is to ensure that our app works with the Chinese ecosystem, within the “Great Firewall.”
While there is news of the google play store returning to China, at the moment the android app store ecosystem is quite fragmented. Some prominent players are Tencent’s MyApp (腾讯应用宝), Qihoo’s 360 Mobile Assistant (360手机助手) and Baidu’s Mobile Assistant (百度手机助手). As far as we could tell, none of these had any solutions that were similar to what the google play store has. Also, we didn’t really want to build out a solution for each app store. So we set out to think of a way to give our Chinese users the same referral experience that our other users have.
We decided that instead of sending our users to a particular app store on referral, we would host our APK within China and the referee would download our app directly from that host. This is actually quite common in China, most android apps are available through direct download as well as on the various Chinese app store.
By doing this, we are able to easily alter the content disposition in the response HTTP header. This allows us to specify what name we want our APK to be saved as on the client. Why does this help us? Because now we can embed the referral code in the name of the APK (along with some other parameters for security), which in turn allows the newly installed app to find it’s own APK and extract the referral code from there.
Here is the logic:
However we quickly realized that there is a problem! Many Chinese users don’t use the default browsers that ship with their phones. Instead they use browsers like UC browser or Baidu browser. This is a problem because when you use these browsers to download APKs, they get saved in a custom directory determined by the browser. This means that looking for the APK in the standard android download path won’t be that helpful.
We decided that while we improve upon solution #1 to accommodate some of the more widely used browsers, we would enable our referees to manually input a referral code when they join. We only enable this option in cases where we can’t detect a referral code from the APK. Our hope is that as we improve solution #1, users will see this less and less.
Have good ideas on how to tackle this problem? We’d love to hear about it in the comments. Also, we are hiring!