Giter Site home page Giter Site logo

swayangjit / cordova-plugin-play-installreferrer Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 8.0 324 KB

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

License: Apache License 2.0

Java 95.99% JavaScript 4.01%
cordova-plugin referrer-api referrer play-instalreferrer cordova ionic android installreferrer

cordova-plugin-play-installreferrer's Introduction

cordova-plugin-play-installreferrer

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

$  cordova  plugin  add  cordova-plugin-play-installreferrer

Or install a specific version:

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

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

Or install the latest head version:

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

Or install from local source:

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

cordova-plugin-play-installreferrer's People

Contributors

swayangjit avatar

Watchers

 avatar  avatar  avatar

cordova-plugin-play-installreferrer's Issues

I am not getting referrer id passed in playstore app url

just getting the default response from the plugin every time when i open app from playstore:

{"installTs":"0","isInstantExperienceLaunched":"false","utm_medium":"organic","clickTs":"0","responseCode":"0","utm_source":"google-play"}

my url is: https://play.google.com/store/apps/details?id=com.ipro.app&referrer=utm_source=2

Please help

cordova build error after adding plugin

[INF] [shellscript] > Task :CordovaLib:bundleLibCompileToJarDebug UP-TO-DATE
[INF] [shellscript] Note: Some input files use or override a deprecated API.
[INF] [shellscript] Note: Recompile with -Xlint:deprecation for details.
[INF] [shellscript]
[INF] [shellscript] > Task :app:compileDebugJavaWithJavac FAILED
[INF] [shellscript] C:\Users\maulp\Documents\web-projects\packaged-pwa\packaged_pwa\cordova\platforms\androi.annotation does not exist
[INF] [shellscript] import android.support.annotation.Nullable;
[INF] [shellscript] ^
[INF] [shellscript] C:\Users\maulp\Documents\web-projects\packaged-pwa\packaged_pwa\cordova\platforms\androi
[INF] [shellscript] private void handleReferrer(@nullable ReferrerDetails response, int responseCode) '{
[INF] [shellscript] ^
[INF] [shellscript] symbol: class Nullable
[INF] [shellscript] location: class PlayStoreInstallReferrerImpl
[INF] [shellscript] Note: C:\Users\maulp\Documents\web-projects\packaged-pwa\packaged_pwa\cordova\platforms\erations.
[INF] [shellscript] Note: Recompile with -Xlint:unchecked for details.
[INF] [shellscript] 2 errors
[INF] [shellscript]
[INF] [shellscript] FAILURE: Build failed with an exception.
[INF] [shellscript]
[INF] [shellscript] * What went wrong:
[INF] [shellscript] Execution failed for task ''':app:compileDebugJavaWithJavac'''.
[INF] [shellscript] > Compilation failed; see the compiler error output for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.