cordova-plugin-play-installreferrer-v1
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

cordova-plugin-play-installreferrer-v1

npm version License License

Cordova plugin to retrieve referral content from Google play using Google Play Store's Install Referrer API(Android)

API

The plugin exposes the following method:

installReferrer.getReferrer(success, error);

Parameters:

  • success: success callback The response object will have the object which contains all the referrer details and some of the common attributes are following

    . responseCode: response code(0/1/2) . clickTs: Referrer link click time stamp . installTs: Install time stamp . isInstantExperienceLaunched: whether instant app launched or not

  • error: error callback

Notes

  • By default if the plugin method is called then the response will be like following

     {
       "clickTs": "0",
       "installTs": "0",
       "isInstantExperienceLaunched": "false",
       "responseCode": "0",
       "utm_medium": "organic",
       "utm_source": "google-play"
     }
    
  • if the url is like following https://play.google.com/store/apps/details?id=com.example.application &referrer=utm_source%3Dgoogle %26utm_medium%3Dcpc and its clicked in a device having playstore then the response will look like following

      {
       "clickTs": "<valid_ts>",
       "installTs": "<valid_ts>",
       "isInstantExperienceLaunched": "false",
       "responseCode": "0",
       "utm_medium": "cpc",
       "utm_source": "google"
     }
    

Installation

The plugin can be installed via Cordova-CLI and is publicly available on NPM.

Execute from the projects root folder:

$  npm  i  cordova-plugin-play-installreferrer-v1

$  cordova  plugin  add  cordova-plugin-play-installreferrer-v1

Or install a specific version:

$  npm  i  cordova-plugin-play-installreferrer-v1@<latest_version>

$  cordova  plugin  add  cordova-plugin-play-installreferrer-v1@<latest_version>

Or install the latest head version:

$  cordova  plugin  add https://github.com/trinitiwowka/cordova-plugin-play-installreferrer.git

Or install from local source:

$  cordova  plugin  add  <path>  --nofetch  --nosave  --link

Package Sidebar

Install

npm i cordova-plugin-play-installreferrer-v1

Weekly Downloads

1

Version

2.2.1

License

Apache 2.0

Unpacked Size

24.9 kB

Total Files

12

Last publish

Collaborators

  • denis_galkin