Can we implement a referral code thing in IONIC


#1

can anyone tell me how i can use the referral code inside my ionic-app?


#2

What kind of referral code are you intending? To refer Ionic or your app? More details please.


#3

basically to refer app. according to the referral code there will be some change inside the app, for different refferals different changes inside.


#4

This is application specific and nothing to do with Ionic. And yes, of course you can implement that.


#5

can you please help me with this on how to implement it? or how to get the referral code


#6

my question is to access the url parameters of the google play store
eg www.googleplaystore.com/myappname?"somecode"
so i want to access this “somecode” inside my application when the user download myapp


#7

It’s quite simple actually. You click on the link with a referral (Google calls them Campaing Attribution) and this link is passed to the Google Play Store app. Then, when you install the app, the Play Store also forwards this data (campaign name, source, &c) to the app itself.

The app just needs to have a particular BroadcastReceiver (with an intent-filter for the com.android.vending.INSTALL_REFERRER action) declared in its Manifest for this to work.

It’s well explained in the Google Play Campaign Attribution section of the Google Analytics documentation.