How to implement referral code in Hybrid Mobile Apps while downloading from store

Issue

I need to implement a scenario in which App is shared by any user with some unique code attached at end of link

https://play.google.com/store/apps/details?id=com.App.hybrid.myapp&Ref=A8%gdbT^7YgH

When someone download app from given above link, he will get some promotions, or discount etc.

is there any way to implement this in ionic apps (Ionic 1).

Solution

After a bit of googling, got to know that there are some readymade plugins to achieve what you are looking for. Basically you are looking for InstallReferrerReceiver implemenation in cordova android.

Suggest you to look at android-referrer plugin which captures the referrer value passed when an android app is installed from a webpage and stores it in the applications shared preferences for later retrieval.

Also check out the following links as well which should be handy

  1. Referral tracking in cordova android app
  2. InstallReferrerReceiver in cordova android app

Hope it helps. Cheers

Answered By – Gandhi

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published