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

capacitor-chottulink-sdk

v1.0.4

Published

ChottuLink is your all-in-one solution for creating, managing, and tracking dynamic links across platforms. Boost your marketing campaigns with smart deep linking and comprehensive analytics.

Readme

ChottuLink Capacitor SDK

npm version License

ChottuLink is your all-in-one solution for creating, managing, and tracking dynamic links across platforms. Boost your marketing campaigns with smart deep linking and comprehensive analytics.

Features

  • 🔗 Dynamic Link Creation - Create short, trackable links with custom parameters
  • 📱 Deep Linking - Seamlessly route users to specific content in your app
  • 📊 Analytics - Track link performance with UTM parameters
  • 🎯 Platform-Specific Behavior - Control how links behave on iOS and Android
  • 🔔 Event Listeners - Listen for deep link resolution events
  • 🌐 Cross-Platform - Works on iOS, Android, and Web (with limitations)

Installation

npm install capacitor-chottulink-sdk
npx cap sync

Prerequisites

Before installing this plugin, ensure you have the following set up:

  • Node.js: 16.x or higher
  • Capacitor: 5.0.0 or higher
  • iOS Deployment Target: 15.0 or higher
  • Android SDK: API 21 (Android 5.0) or higher
  • ChottuLink Account: A valid ChottuLink account with an API key

Getting Started

1. Initialize the SDK

Before using any ChottuLink features, you must initialize the SDK with your API key:

import { ChottuLinkIonicSDK } from 'capacitor-chottulink-sdk';

await ChottuLinkIonicSDK.initialize({
    apiKey: 'your-api-key-here'
});

2. Create Dynamic Links

Create dynamic links with customizable parameters:

import { ChottuLinkIonicSDK, CLDynamicLinkBehaviour } from 'capacitor-chottulink-sdk';

const result = await ChottuLinkIonicSDK.createDynamicLink({
    builder: {
        destinationURL: 'https://example.com/product/123',
        domain: 'your-domain.com',
        linkName: 'product-link',
        iosBehaviour: CLDynamicLinkBehaviour.app,
        androidBehaviour: CLDynamicLinkBehaviour.app,
        socialTitle: 'Check out this product!',
        socialDescription: 'Amazing product description',
        socialImageUrl: 'https://example.com/image.jpg',
        utmSource: 'email',
        utmMedium: 'campaign',
        utmCampaign: 'summer-sale'
    }
});

console.log('Short URL:', result.shortURL);

3. Handle Incoming Links:

// Listen for successful deep link resolution
ChottuLinkIonicSDK.addListener('onDeepLinkResolved', (data) => {
    console.log('Deep link resolved:', data.url);
    console.log('Metadata:', data.metadata);
    // Navigate to the appropriate screen in your app
});

// Listen for failed deep link resolution
ChottuLinkIonicSDK.addListener('onDeepLinkFailed', (data) => {
    console.error('Deep link failed:', data.error);
    console.log('Original URL:', data.originalURL);
});

4. (Optional) Get AppLink Data from the Deeplink URL directly

const resolved = await ChottuLinkIonicSDK.getAppLinkDataFromUrl({
  shortURL: 'https://your-domain.com/abc123'
});

if (resolved) {
  console.log('Original link:', resolved.link);
  console.log('Short link:', resolved.shortLink);
  console.log('Short link Raw:', resolved.shortLinkRaw);
  console.log('isDeferred:', resolved.isDeferred);
}

Web

⚠️ Note: The plugin methods are not fully implemented on web. They will throw unimplemented errors. This plugin is primarily designed for native mobile platforms.

API

initialize(...)

initialize(options: { apiKey: string; }) => Promise<void>

| Param | Type | | ------------- | -------------------------------- | | options | { apiKey: string; } |


createDynamicLink(...)

createDynamicLink(options: { builder: CLDynamicLinkBuilder; }) => Promise<{ shortURL: string | null; }>

| Param | Type | | ------------- | ----------------------------------------------------------------------------------- | | options | { builder: CLDynamicLinkBuilder; } |

Returns: Promise<{ shortURL: string | null; }>


getAppLinkDataFromUrl(...)

getAppLinkDataFromUrl(options: { shortURL: string; }) => Promise<CLResolvedLink | null>

| Param | Type | | ------------- | ---------------------------------- | | options | { shortURL: string; } |

Returns: Promise<CLResolvedLink | null>


addListener('onDeepLinkResolved', ...)

addListener(eventName: 'onDeepLinkResolved', listenerFunc: (data: { url: string; metadata?: Record<string, any>; }) => void) => Promise<PluginListenerHandle>

| Param | Type | | ------------------ | ------------------------------------------------------------------------------------------------------------ | | eventName | 'onDeepLinkResolved' | | listenerFunc | (data: { url: string; metadata?: Record<string, any>; }) => void |

Returns: Promise<PluginListenerHandle>


addListener('onDeepLinkFailed', ...)

addListener(eventName: 'onDeepLinkFailed', listenerFunc: (data: { error: string; originalURL?: string; }) => void) => Promise<PluginListenerHandle>

| Param | Type | | ------------------ | ------------------------------------------------------------------------ | | eventName | 'onDeepLinkFailed' | | listenerFunc | (data: { error: string; originalURL?: string; }) => void |

Returns: Promise<PluginListenerHandle>


Interfaces

CLDynamicLinkBuilder

| Prop | Type | | ----------------------- | ------------------------------------------------------------------------- | | destinationURL | string | | domain | string | | linkName | string | | androidBehaviour | CLDynamicLinkBehaviour | | iosBehaviour | CLDynamicLinkBehaviour | | selectedPath | string | | socialTitle | string | | socialDescription | string | | socialImageUrl | string | | utmSource | string | | utmMedium | string | | utmCampaign | string | | utmContent | string | | utmTerm | string |

CLResolvedLink

| Prop | Type | | ------------------ | ---------------------------- | | isDeferred | boolean | null | | link | string | null | | shortLink | string | null | | shortLinkRaw | string | null |

PluginListenerHandle

| Prop | Type | | ------------ | ----------------------------------------- | | remove | () => Promise<void> |

Type Aliases

Record

Construct a type with a set of properties K of type T

{ [P in K]: T; }

Enums

CLDynamicLinkBehaviour

| Members | Value | | ------------- | -------------- | | browser | 1 | | app | 2 |

Complete Example

Here's a complete example of how to use the plugin in your Capacitor app:

import { ChottuLinkIonicSDK, CLDynamicLinkBehaviour } from 'capacitor-chottulink-sdk';

// Initialize on app startup
async function initChottuLink() {
  try {
    await ChottuLinkIonicSDK.initialize({
      apiKey: 'your-api-key-here'
    });
    console.log('ChottuLink SDK initialized');
  } catch (error) {
    console.error('Failed to initialize ChottuLink:', error);
  }
}

// Set up deep link listeners
function setupDeepLinkListeners() {
  ChottuLinkIonicSDK.addListener('onDeepLinkResolved', (data) => {
    console.log('Deep link resolved:', data.url);
    // Navigate to the appropriate screen based on data.url
    // Example: router.push(parseUrl(data.url));
  });

  ChottuLinkIonicSDK.addListener('onDeepLinkFailed', (data) => {
    console.error('Deep link failed:', data.error);
    // Handle error appropriately
  });
}

// Create a dynamic link
async function shareProduct(productId: string) {
  try {
    const result = await ChottuLinkIonicSDK.createDynamicLink({
      builder: {
        destinationURL: `https://yourapp.com/products/${productId}`,
        domain: 'your-domain.com',
        linkName: `product-${productId}`,
        iosBehaviour: CLDynamicLinkBehaviour.app,
        androidBehaviour: CLDynamicLinkBehaviour.app,
        socialTitle: 'Check out this amazing product!',
        socialDescription: 'You won\'t believe what this product can do.',
        socialImageUrl: `https://yourapp.com/images/products/${productId}.jpg`,
        utmSource: 'app',
        utmMedium: 'share',
        utmCampaign: 'product-sharing'
      }
    });

    if (result.shortURL) {
      // Share the short URL
      await Share.share({ url: result.shortURL });
    }
  } catch (error) {
    console.error('Failed to create dynamic link:', error);
  }
}

// Initialize on app load
initChottuLink();
setupDeepLinkListeners();

Troubleshoot & Test Deep links

For more detailed troubleshooting steps and testing procedures, visit: https://docs.chottulink.com/troubleshooting