简体   繁体   English

从我们自己的服务器(而非Play商店)分发的Android应用的引荐/邀请跟踪

[英]Referral/Invite Tracking for Android app distributed from our own server instead of Play Store

We are not distributing our app from Google Play due to some policy violations and instead planning to put it on our own server for direct download. 由于违反某些政策,我们不会从Google Play分发我们的应用,而是计划将其放置在我们自己的服务器上以直接下载。

I want to implement invite friends feature in android mobile app. 我想在android移动应用中实现邀请朋友功能。 My app user will invite his friends through a dynamic link shared similar to 我的应用程序用户将通过动态链接邀请他的朋友,该链接类似于

 https://example.com/download_app?referred_by_user=12345678_john 

On clicking on that link, android apk will be downloaded from our own server, user will manually install it. 点击该链接后,将从我们自己的服务器上下载android apk,用户将手动安装它。 When user open app first time after installing, i want to read the referred_by_user=12345678_john parameter from the referral link to validate it against our database users and then to award referrer user some points. 用户在安装后第一次打开应用程序时,我想从引荐链接中读取referred_by_user = 12345678_john参数,以针对我们的数据库用户对其进行验证,然后向引荐用户授予一些奖励。

is there any way to achieve this without distributing app through Google Play? 有什么方法可以通过不通过Google Play分发应用来实现这一目标?

Unfortunately, unless you're also distributing your own version of the Play Store (which can broadcast this data via INSTALL_REFERRER parameter when you launch your app), I don't think there's a way to do this client-side. 不幸的是,除非您还分发自己的Play商店版本(启动应用程序时可以通过INSTALL_REFERRER参数广播此数据),否则我认为没有办法在客户端进行此操作。

What you can do is add either a mobile number or email address of the invited friend (depending on which one you use for sign-up in your app) as query parameter on your dynamic link. 您可以做的是在动态链接上添加被邀请朋友的手机号码或电子邮件地址(取决于您在应用程序中用于注册的朋友)作为查询参数。 Now when the invited friend clicks on the link, your server can capture both referrer ID and his friend's phone number or email, and store that combination (we'll call this Referral Table), mark it as pending referral bonus. 现在,当被邀请的朋友单击链接时,您的服务器可以同时获取推荐人ID和他朋友的电话号码或电子邮件,并存储该组合(我们将其称为“推荐表”),将其标记为待处理的推荐奖金。 Now when anyone signs up you can query the number/email against the referral table, and when there's a match, you would know via referrer ID who invited this new customer. 现在,当任何人注册时,您都可以在引荐表格中查询电话号码/电子邮件,并且如果存在匹配项,则可以通过引荐人ID知道邀请了该新客户。

Now this only works automatically when the link is dynamically generated for the referred friend. 现在,这仅在为所引用的朋友动态生成链接时自动起作用。 For public referral links you can maybe do something like capture the friend's IP address, or even have a form that the friend can fill up with his email/phone number before redirecting him to the apk. 对于公共推荐链接,您可以执行诸如捕获朋友的IP地址之类的操作,甚至可以使用某种形式,让朋友在将他重定向至apk之前填写其电子邮件/电话号码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM