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-linkrunner

v1.1.0

Published

Linkrunner SDK plugin for Apache Cordova

Readme

Linkrunner Cordova SDK

A Cordova plugin for integrating Linkrunner attribution, deeplinks, and analytics into your Apache Cordova applications.

Requirements

  • Apache Cordova 10.0.0+
  • iOS 15.0+ / Android 5.0 (API level 21)+
  • Kotlin support for Android

Installation

cordova plugin add cordova-linkrunner

Configuration

Android - Enable Kotlin

Add the following to your config.xml:

<preference name="GradlePluginKotlinEnabled" value="true" />
<preference name="GradlePluginKotlinCodeStyle" value="official" />

iOS - Info.plist Configuration

The plugin automatically configures the following in your Info.plist:

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

<key>NSAdvertisingAttributionReportEndpoint</key>
<string>https://linkrunner-skan.com</string>

<key>AttributionCopyEndpoint</key>
<string>https://linkrunner-skan.com</string>

Usage

Initialization

Initialize the SDK when your app starts:

document.addEventListener('deviceready', function() {
    linkrunner.init({
        token: 'YOUR_PROJECT_TOKEN',
        secretKey: 'YOUR_SECRET_KEY',  // Optional: for request signing
        keyId: 'YOUR_KEY_ID',           // Optional: for request signing
        disableIdfa: false,             // Optional: disable IDFA on iOS
        debug: true                     // Optional: enable debug logging
    }).then(function() {
        console.log('Linkrunner initialized');
    }).catch(function(error) {
        console.error('Linkrunner init failed:', error);
    });
}, false);

User Registration

Call signup after user completes onboarding:

linkrunner.signup({
    user_data: {
        id: '123',                              // Required
        name: 'John Doe',                       // Optional
        phone: '9876543210',                    // Optional
        email: '[email protected]',              // Optional
        user_created_at: '2024-01-01T00:00:00Z', // Optional
        is_first_time_user: true,               // Optional
        mixpanel_distinct_id: 'mixpanel_id',    // Optional
        amplitude_device_id: 'amplitude_id',    // Optional
        posthog_distinct_id: 'posthog_id'       // Optional
    },
    data: {}  // Optional: additional data
}).then(function() {
    console.log('Signup successful');
}).catch(function(error) {
    console.error('Signup failed:', error);
});

Set User Data

Call setUserData each time the app opens with a logged-in user:

linkrunner.setUserData({
    id: '123',                          // Required
    name: 'John Doe',                   // Optional
    email: '[email protected]'           // Optional
}).then(function() {
    console.log('User data set');
});

Track Events

linkrunner.trackEvent('purchase_completed', {
    product_id: '12345',
    category: 'electronics',
    amount: 99.99
}).then(function() {
    console.log('Event tracked');
});

Capture Payment

linkrunner.capturePayment({
    userId: 'user123',
    amount: 100,
    paymentId: 'payment456',            // Optional
    type: 'FIRST_PAYMENT',              // Optional
    status: 'PAYMENT_COMPLETED'         // Optional
}).then(function() {
    console.log('Payment captured');
});

Get Attribution Data

linkrunner.getAttributionData().then(function(result) {
    console.log('Attribution data:', result.data);
    // result.data.deeplink
    // result.data.campaignData
});

Handle Deeplinks

To enable remarketing and reattribution, capture deeplinks and pass them to Linkrunner.

Step 1: Install Universal Links Plugin

cordova plugin add cordova-universal-links-plugin --save

Step 2: Configure Universal Links

Add to your config.xml:

<universal-links>
    <host name="yourdomain.com" scheme="https">
        <path url="/*" />
    </host>
</universal-links>

Step 3: Handle Deeplinks

document.addEventListener('deviceready', function() {
    // Initialize Linkrunner first
    linkrunner.init({ token: 'YOUR_TOKEN' });
    
    // Subscribe to deeplink events
    universalLinks.subscribe(null, function(eventData) {
        console.log('Deeplink received:', eventData.url);
        
        // Pass to Linkrunner for attribution
        linkrunner.handleDeeplink(eventData.url).then(function(result) {
            console.log('Deeplink handled:', result);
            // result.data.is_linkrunner - whether it's a Linkrunner link
            // result.data.deeplink - the resolved deeplink URL
            // result.data.processing - whether still processing (optional)
        });
    });
}, false);

Alternative: Custom URL Scheme

For custom URL schemes (e.g., myapp://), use the handleOpenURL function:

window.handleOpenURL = function(url) {
    console.log('Custom URL received:', url);
    
    linkrunner.handleDeeplink(url).then(function(result) {
        console.log('Deeplink handled:', result);
    });
};

Payment Types

  • FIRST_PAYMENT - First payment by user
  • WALLET_TOPUP - Adding funds to wallet
  • FUNDS_WITHDRAWAL - Withdrawing funds
  • SUBSCRIPTION_CREATED - New subscription
  • SUBSCRIPTION_RENEWED - Subscription renewal
  • ONE_TIME - One-time payment
  • RECURRING - Recurring payment
  • DEFAULT - Default type

Payment Status

  • PAYMENT_INITIATED - Payment initiated
  • PAYMENT_COMPLETED - Payment completed (default)
  • PAYMENT_FAILED - Payment failed
  • PAYMENT_CANCELLED - Payment cancelled

Additional Features

Set Integration Data

linkrunner.setAdditionalData({
    clevertapId: 'YOUR_CLEVERTAP_ID'
});

Enable PII Hashing

linkrunner.enablePIIHashing(true);

Set Push Token

linkrunner.setPushToken('YOUR_PUSH_TOKEN');

Function Placement Guide

| Function | Where to Place | When to Call | |----------|---------------|--------------| | init | App initialization | Once when app starts | | signup | Onboarding flow | Once after user completes onboarding | | setUserData | Authentication logic | Every time app opens with logged-in user | | trackEvent | Throughout app | When specific user actions occur | | capturePayment | Payment processing | When user makes a payment | | getAttributionData | Attribution flow | When attribution data is needed | | handleDeeplink | Deeplink entry points | When app is opened via deeplink |

Documentation

For complete documentation, visit: https://docs.linkrunner.io/sdk/cordova

Support

For issues or questions, contact: [email protected]

License

MIT License - Copyright (c) 2026 Linkrunner Private Limited