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-apxor-sdk

v1.2.5

Published

A cordova plugin for Apxor SDK

Downloads

15

Readme

Apxor Cordova SDK

Description

Cordova plugin wrapper for Apxor Android SDK.

How to Use

  • Run cordova plugin add cordova-plugin-apxor-sdk
  • Add the following meta-data tag inside your application tag in your AndroidManifest.xml file
<application>
    <!-- You must replace your app in android:value attribute -->
    <meta-data android:name="APXOR_APP_ID" android:value="YOUR_APP_ID" />
</application>

APIs

Add the following after your import statements in every component where you use Apxor SDK APIs

declare var ApxorSDK: any;

UserId

Sets a unique user identifier. You can set it when user logged into application and reset it when users logged out

// Syntax
ApxorSDK.setUserIdentifier("STRING");

// Example
ApxorSDK.setUserIdentifier("<unique_user_id>");

To track events

// Syntax
ApxorSDK.logAppEvent(event_name, properties);

// Example
ApxorSDK.logAppEvent("ADD_TO_CART", {
    "userId": "[email protected]",
    "value": 1299,
    "item": "Sony Head Phone 1201"
});

To track client events

// Syntax
ApxorSDK.logClientEvent(event_name, properties);

// Example
ApxorSDK.logClientEvent("ADD_TO_CART", {
  userId: "[email protected]",
  value: 1299,
  item: "Sony Head Phone 1201",
});

User Properties

Set unique user properties only when you need to add or update them. All the properties whose value is null or undefined will be ignored

// Syntax
ApxorSDK.setUserCustomInfo(properties);

// Example
ApxorSDK.setUserCustomInfo({
  Age: 10,
  Name: "John Wick",
});

Session Attributes

A Session can be simply defined as user journey as he opens the app, until he closes the app. There can be various pieces of information that be very impactful when accumulated in a session. For example, location in a session can be useful to know exactly where, the user is utilizing the app most.

To add session attributes that are specific to a session,

ApxorSDK.setSessionCustomInfo({network: "4G", city: "Newyork"});

Track Screens

You can track time spent in tabs/components inside your application

ApxorSDK.trackScreen("CartPage");

Note

You can check the typings or APIs exposed by exploring plugins/cordova-plugin-apxor-sdk/www/ApxorCordovaPlugin.js or plugins/cordova-plugin-apxor-sdk/src/ApxorSDK.d.ts

Deeplinking in Cordova

If your application handles deeplinks within Cordova layer, make sure you add the following in your root component.

Note: By default Apxor SDK doesn't redirect external URLs which will be opened in Mobile browser. You need to handle that expliitly in your code

ApxorSDK.registerDeeplinkHandler((deeplinkUrl) => {
  // Whenever redirection happens from InApp notification buttons,
  // this callback will be executed.

  switch (deeplinkUrl) {
    case "scheme://about":
      // Redirect to About Component
      break;
    default:
      // Check if it's external URL and redirect to Browser
      break;
    // and so on
  }
});

API Guide

Read more here