Software Archive
Read-only legacy content
17060 Discussions

How to implement InstallReferrerReceiver in Cordova for Android?

Vijay_R_3
Beginner
1,327 Views
Hello, I am trying to implement InstallReferrerReceiver in an Android App published in PlayStore. So that we can send referral data (utm_source...) via the PlayStore link and get that data after the App gets installed on the device. If anyone has already made it possible via Cordova, please let me know. Thank you.
0 Kudos
4 Replies
Elroy_A_Intel
Employee
1,327 Views

You can use the https://github.com/danwilson/google-analytics-plugin Cordova Plugin to track installs of your application.

0 Kudos
Vijay_R_3
Beginner
1,327 Views

Thank you so much. But seems it is not documented to get the Install_Referrer. I will check out the code and Analytics SDK, if you have already implemented do let me know.

0 Kudos
Vijay_R_3
Beginner
1,327 Views

Elroy Ashtian Jr (Intel) wrote:

You can use the https://github.com/danwilson/google-analytics-plugin Cordova Plugin to track installs of your application.

Hello,

I have installed this plugin and while testing locally by broadcasting the below intent, it works fine and i get the referral data printed in the log ("utm_source=test"), is it possible to save the data received and store it in a local JavaScript variable.

Like, var referrer = "utm_source=test";

adb shell am broadcast -a com.android.vending.INSTALL_REFERRER -n com.example.app/com.google.android.gms.analytics.CampaignTrackingReceiver --es referrer "utm_source=test"

Thank you.

0 Kudos
PaulF_IntelCorp
Employee
1,327 Views

For that you might want to contact the plugin author, directly on his github site.

0 Kudos
Reply