6

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).

trighati
  • 1,176
  • 7
  • 19
  • 49

3 Answers3

6

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

Gandhi
  • 11,397
  • 4
  • 35
  • 56
  • @ShubhamTakode did you tried this - https://github.com/DualH/cordova-plugin-installreferrer – Gandhi Nov 25 '19 at 10:49
3

You may need to write some native code

refer this answer might helpful: how to use app links to pass parameter to android playstore to be retrieved when app is installed

Community
  • 1
  • 1
Sharad Kale
  • 863
  • 7
  • 17
1

No I think there is no way like how you mentioned. Best way to implement is following general procedure.

After installing the app, there should be a input field (which will be optional to enter) to enter referral code and using web api, validate that code and give promotional offers to users

varun aaruru
  • 2,770
  • 1
  • 16
  • 36
  • By this, I cannot achieve my target, My requirement is when only app is shared by any user, it contains code in the end. but when user directly download it from store, he is not eligible for that promotion. – trighati Apr 19 '17 at 09:23
  • 1
    if you anything in the end of ant url of app, it does not affect the downloading original link. I just want to get during download. here is example: Original Link:: `https://play.google.com/store/apps/details?id=com.stackexchange.marvin` Modified Link:: `https://play.google.com/store/apps/details?id=com.stackexchange.marvin&Code=123456`, see works well – trighati Apr 19 '17 at 09:34