npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cordova-android-referrer

v1.0.0

Published

android-referrer-plugin =======================

Readme

android-referrer-plugin

This plugin captures the referrer value passed when an android app is installed from a webpage and stores it in the applications shared preferences for later retrieval.

You'll typically want to use the AppPreferences plugin to pull the referrer value into your phonegap app for your javascript code to manipulate.

Purpose

This plugin lets your app display different behavior based on where it was installed from. If you have a sports app, for example, and want to use the same codebase, but brand the app differently for different teams, you can use this plugin to capture whether the app was installed from the Denver Broncos or Washington Redskins page, and skin the app appropriately.

Don't forget when using this plugin that if an app is installed directly from Google Play, this plugin will not execute--the intent will never fire.

Install

This plugin uses plugman

cordova plugins add https://github.com/8zrealestate/android-referrer-plugin

Usage

To use this plugin, add &referrer=xyz to app install links on your webpages. For example:

http://market.android.com/details?id=com.yourid.here&referrer=textinreferrer
market://details?id=com.yourid.here&referrer=textinreferrer

The value in the referrer text (textinreferrer above) will be stored as a string in your apps shared preferences object, under the key referrer.

To test that the install referrer event is received by the plugin in your emulator:

run adb shell and then

am broadcast -a com.android.vending.INSTALL_REFERRER \
-n <your package here>/com.eightz.mobile.cordova.plugin.android.referrer.Receiver \
--es "referrer" "textinreferrer"

Limits

  • I don't know how long a referrer string can be.
  • I believe the referrer string can contain any characters that are valid in URL query strings, but don't think that ampersands are allowed. For example: &referrer=foo&bar would result in a captured referrer of foo
  • If you are trying to be compatible with the app-argument text in Apple smart banners, be aware that app-argument text block is required to be a url.