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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-yozio

v2.0.8

Published

Cordova plugin for the Yozio mobile app tracking platform. https://www.yozio.com

Downloads

7

Readme

Cordova plugin for Yozio

This is a Cordova plugin for the Yozio mobile app tracking platform.

You can find out more about Yozio here: https://www.yozio.com.

This version of the plugin uses versions 2.1.0 (iOS) and 1.1.13 (Android) of the Yozio SDK. Documentation for Yozio SDKs can be found here for iOS and here for Android.

Install

To add the plugin to your Cordova project, simply add the plugin from the npm registry. You'll need to specify the following parameters:

  • YOZIO_APP_KEY - Your Yozio application key (available from the Yozio console)
  • YOZIO_SECRET_KEY - Your Yozio secret key (available from the Yozio console)
  • URL_SCHEME - Your application's custom URL scheme (enter appname to use appname://...)
  • YOZIO_IOS_ENABLE_UNIVERSAL_LINKS Indicates if you are using iOS Universal Links (should be YES or NO)
  • YOZIO_DOMAIN The domain you are using for your SuperLinks (if you aren't using a custom domain, then specify r.yoz.io)

For example, an app with all an app key of 123, secret key of 456, a link scheme of appname://... and iOS universal link support with the custom domain r.company.com, the command would look like this:

cordova plugin add cordova-plugin-yozio --variable YOZIO_APP_KEY=123 --variable YOZIO_SECRET_KEY=456 --variable URL_SCHEME=appname --variable YOZIO_IOS_ENABLE_UNIVERSAL_LINKS=YES --variable YOZIO_DOMAIN=r.company.com

Note: Even if you are not using iOS universal links or a custom domain, the parameters still need to be specified. You can use YOZIO_IOS_ENABLE_UNIVERSAL_LINKS=NO and YOZIO_DOMAIN=r.yoz.io in this case.

Alternatively, you can install plugin directly from git by replacing the plugin ID with the git URL: https://github.com/Justin-Credible/cordova-plugin-yozio#2.0.8

Usage

The plugin handles hooking the various application events needed to initialize with Yozio as well as capture installation and deep link metadata.

The plugin is available via a global variable named YozioPlugin. It exposes the following properties and functions.

All functions accept optional success and failure callbacks as their final two arguments, where the failure callback will receive an error string as an argument unless otherwise noted.

A TypeScript definition file for the JavaScript interface is available in the typings directory as well as on DefinitelyTyped via the tsd tool.

Check If New Install

Used to check to see if the current running instance is a new installation of the app.

Method Signature:

getIsNewInstall(successCallback, failureCallback)

Example Usage:

YozioPlugin.getIsNewInstall(function(isNewInstall) {
    console.log("IsNewInstall: " + isNewInstall);
});

Check If Was Opened Via Deep Link

Used to check to see if the current running instance was launched via a deep link.

Method Signature:

getWasOpenedViaDeepLink(successCallback, failureCallback)

Example Usage:

YozioPlugin.getWasOpenedViaDeepLink(function(wasOpenedViaDeepLink) {
    console.log("WasOpenedViaDeepLink: " + wasOpenedViaDeepLink);
});

Get Installation Metadata

Used get the installation metadata from when the application was installed as well as a flag that indicates if the current running instance is a new installation of the app.

Method Signature:

getInstallMetadata(successCallback, failureCallback)

Example Usage:

YozioPlugin.getInstallMetadata(function(installMetadata) {
    console.log("Install Metadata: " + JSON.stringify(installMetadata));
});

Get Deep Link Metadata

Used get the metadata from when the application was launch with a deep link.

Method Signature:

getLastDeeplinkMetadata(successCallback, failureCallback)

Example Usage:

YozioPlugin.getLastDeeplinkMetadata(function(metadata) {
    console.log("Deep Link Metadata: " + JSON.stringify(metadata));
});

User Sign Up Tracking

Used to track a user sign up event.

Method Signature:

trackSignup(successCallback, failureCallback)

Example Usage:

YozioPlugin.trackSignup();

User Payment Tracking

Used to track a user payment event.

Method Signature:

trackPayment(amount, successCallback, failureCallback)

Parameters:

  • amount (number): The payment amount to record.

Example Usage:

YozioPlugin.trackPayment(9.99);

Custom Event Tracking

Used to track a custom user event.

Method Signature:

trackEvent(eventName, value, successCallback, failureCallback)

Parameters:

  • eventName (string): The name of the custom event to track.
  • value (number): The optional value to track with the event.

Example Usage:

YozioPlugin.trackEvent("Coupon Code", 10);

YozioPlugin.trackEvent("Account Linked");