1.0.14 • Published 1 year ago

@dudod/capacitor-plugin-install-referrer v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@dudod/capacitor-plugin-install-referrer

Copy of togetherprice/capacitor-plugin-install-referrer

Original plugin: https://www.npmjs.com/package/@togetherprice/capacitor-plugin-install-referrer

Plugin to retrieve and use the Google play install referrer

Install

npm install @dudod/capacitor-plugin-install-referrer
npx cap sync

Android

Register the plugin by adding it to you MainActivity's onCreate:

import com.togetherprice.capacitor.installreferrer.InstallReferrerPlugin;

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    registerPlugin(InstallReferrerPlugin.class);
  }
}

API

getReferrerDetails()

getReferrerDetails() => any

Return the install referrer passed to the store when installing the app, if any.

Usage:

import { InstallReferrer } from '@dudod/capacitor-plugin-install-referrer';

const referrer = await InstallReferrer.getReferrerDetails();

Returns: ReferrerDetails


Interfaces

ReferrerDetails

PropTypeDescription
referrerUrlstringThe install referrer passed to the store when installing the app, if any.
referrerClickTimenumberThe install referrer click time.
appInstallTimenumberThe app install time.
instantExperienceLaunchedbooleanIf the instant experience was launched.

Test

Add a referrer parameter to any URLs that will be linking directly to Google Play Store and set the value of that parameter to a string that describe the source, as in this example:

https://play.google.com/store/apps/details?id=com.example.application
&referrer=utm_source%3Dgoogle
%26utm_medium%3Dcpc
%26utm_term%3Drunning%252Bshoes
%26utm_content%3Dlogolink
%26utm_campaign%3Dspring_sale

Install the app from the store if the app is release, install the app locally if not.

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago