Skip to content

trinitiwowka/capacitor-install-referrer

 
 

Repository files navigation

Android

This package adds BroadcastReceiver to your app and use it to store the Install Referrer from Google Play install link (via SharedPreferences).

Get the install referrer using Capacitor

Just use Storage to get the referrer value:

import { Plugins } from '@capacitor/core';

const { Storage } = Plugins;

...

const ret = await Storage.get({ key: 'referrer' });
console.log('referrer: ', ret.value);

How to test it?

Connect your device, allow USB debuginng and open a console to execute adb shell command:

$ adb shell
$ am broadcast -a com.android.vending.INSTALL_REFERRER -n <package-name>/com.eladcohen.capainstallref.Receiver --es "referrer" "YEHAAA"

Use on Google Play

Just put referrer query string after your package id, like this: https://play.google.com/store/apps/details?id=com.eladcohen.ghfollower&referrer=YEHAAA

TODO

  • Android
  • iOS

About

Capacitor Install Referrer Plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 43.2%
  • Swift 20.3%
  • TypeScript 12.8%
  • Ruby 11.4%
  • Objective-C 8.9%
  • JavaScript 3.4%