How to access google play store url parameter inside ionic application


#1

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

@mhartington can you help me with this?


#2

Not sure this is possible. Couldn’t find anything about how to access this information


#3

INSTALL_REFERRER Looks promising https://developer.android.com/reference/com/google/android/gms/tagmanager/InstallReferrerReceiver.html

But not sure how we can implement this in ionic… The broadcast receiver needs to be present somewhere in the app but where ?? Is the question


#4

It would need to be done in a Cordova plugin, using native code.

If you use Google Analytics that should track the referrer for you automatically.


#5

can you suggest a plugin for it?


#6

There’s a google-analytics-plugin - also wrapped by ngCordova - if you simply want to to track installs in Google Analytics.

If you need to access the install referrer in your own code I’m afraid you’d need to write your own Cordova plugin.


#7

i got the referrer code which is getting saved in my sharedpreferences. do you have any idea on how to access it now?


#8

This cordova.app-preferences plugin? (Haven’t tried it.)


#9

Can you share your experience? Have you made everything work?