Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swayangjit/cordova-plugin-play-installreferrer
Cordova plugin to retrieve referral content from Google play using Google Play Store's Install Referrer API.
https://github.com/swayangjit/cordova-plugin-play-installreferrer
android cordova cordova-plugin installreferrer ionic play-instalreferrer referrer referrer-api
Last synced: 3 months ago
JSON representation
Cordova plugin to retrieve referral content from Google play using Google Play Store's Install Referrer API.
- Host: GitHub
- URL: https://github.com/swayangjit/cordova-plugin-play-installreferrer
- Owner: swayangjit
- License: apache-2.0
- Created: 2020-06-15T17:02:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T10:36:47.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T14:16:59.303Z (3 months ago)
- Topics: android, cordova, cordova-plugin, installreferrer, ionic, play-instalreferrer, referrer, referrer-api
- Language: Java
- Homepage:
- Size: 316 KB
- Stars: 0
- Watchers: 3
- Forks: 8
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `cordova-plugin-play-installreferrer`
> 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:
```javascript
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": "",
"installTs": "",
"isInstantExperienceLaunched": "false",
"responseCode": "0",
"utm_medium": "cpc",
"utm_source": "google"
}
## Installation
The plugin can be installed via [Cordova-CLI](https://cordova.apache.org/docs/en/dev/guide/cli/index.html#The%20Command-line%20Interface) and is publicly available on [NPM](https://www.npmjs.com/package/cordova-plugin-play-installreferrer).
Execute from the projects root folder:
```javascript
$ npm i cordova-plugin-play-installreferrer
$ cordova plugin add cordova-plugin-play-installreferrer
```
Or install a specific version:
```javascript
$ npm i cordova-plugin-play-installreferrer@
$ cordova plugin add cordova-plugin-play-installreferrer@
```
Or install the latest head version:
```javascript
$ cordova plugin add https://github.com/swayangjit/cordova-plugin-play-installreferrer.git
```
Or install from local source:
```javascript
$ cordova plugin add --nofetch --nosave --link
```