Reputation: 1428
We are implementing deferred deep link for attribution for our android application but are unable to get the install referrer when downloaded from facebook ads.
Steps taken,
1.Created deeplinks from branch.io Dashboard=>Ads=>Links. eg myappname.app.link/
2.For redirection in android (when app is not installed) web url is set with desired referrer value. eg. https://play.google.com/store/apps/details?id=mypackagename&referrer=myreferrervalue
3.When user clicks the deep link directly and app is not installed then user is taken to the play store and once the app is installed (through the deep link) we are able to get the install referrer value using install_referrer api broadcast approach.
4.But when app is installed from facebook ads (ads which contains our deeplink),user is taken to play store and once app is installed, we don't get the desired referrer value in install referrer broadcast.
in Manifest.xml
<receiver android:name=".InstallTracker" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
Broadcast receiver for install referrer
public class InstallTracker extends BroadcastReceiver {
private String referrer = "";
@Override
public void onReceive(Context context, Intent intent) {
try {
if (intent.getAction().equals("com.android.vending.INSTALL_REFERRER")) {
Bundle extras = intent.getExtras();
if (extras != null) {
referrer = extras.getString("referrer");
Log.d("tag", "referrer is : "+referrer);
} else {
Log.d("tag", "extras is null ");
}
}
} catch (Exception e) {
Log.d("tag", "error : "+e.getMessage());
}
}
}
Upvotes: 2
Views: 1533
Reputation: 432
Jackie from Branch.io here.
Thanks for bringing this to our attention.
I was able to reproduce the issue and have notified the Engineering team. We are prioritizing this and will follow up with updates soon.
Best,
Upvotes: 2