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

Abdul
  • 1,416
  • 9
  • 26
  • 57

2 Answers2

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
Adriaan
  • 17,741
  • 7
  • 42
  • 75
Gandhi
  • 11,875
  • 4
  • 39
  • 63
  • @ShubhamTakode did you tried this - https://github.com/DualH/cordova-plugin-installreferrer – Gandhi Nov 25 '19 at 10:49
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,920
  • 1
  • 20
  • 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. – Abdul 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 – Abdul Apr 19 '17 at 09:34