Skip to content
Capacitor Install Referrer Plugin
Java Swift TypeScript Ruby Objective-C JavaScript
Branch: master
Clone or download
Latest commit 5d454e2 Sep 3, 2019

README.md

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
You can’t perform that action at this time.