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

@attryio/capacitor

v0.1.11

Published

Capacitor SDK for Attry mobile app analytics, attribution, deep links, deferred deep links, and revenue events.

Readme

@attryio/capacitor

Capacitor SDK for Attry, a mobile app analytics and attribution platform for campaign analytics, app user analytics, deep links, deferred deep links, and revenue events.

Use this package when your app is built with Capacitor. It connects your iOS and Android app to Attry with one App ID and one live SDK key, then collects lifecycle events, native app context, install attribution signals, and custom product events.

Links

Install

npm install @attryio/capacitor
npx cap sync

Use the App ID and live SDK key from Settings -> SDK install in your Attry dashboard. Each Attry app has one App ID and one live key; you do not need separate keys for iOS and Android.

Quick start

Create the client once during app startup.

import { createAttryCapacitor } from "@attryio/capacitor";

export const attry = await createAttryCapacitor({
  appId: "457064853",
  apiKey: "attry_live_..."
});

The SDK starts with practical defaults:

  • Tracks the first SDK install, app opens, session starts/ends, foreground/background changes, and deep link opens.
  • Collects Capacitor app/device context such as platform, app version, build, OS version, model, manufacturer, locale, timezone, and available country context.
  • Resolves Android Google Play Install Referrer through the native plugin.
  • Requests Apple AdServices attribution tokens on iOS through the native plugin.
  • Batches events and retries failed requests through the shared Attry SDK engine.

Track custom events

Use track for app-specific actions. Event names should be stable snake_case; details belong in properties.

await attry.track("quiz_generated", {
  properties: {
    quizId: "quiz_123",
    questionCount: 12,
    source: "note"
  }
});

Attach a signed-in user ID with identify. This is a method, not an event.

attry.identify("user_123");

Purchase intent and revenue

Use initiatePurchase when the user starts a checkout, subscription, or paywall purchase flow.

await attry.initiatePurchase({
  properties: {
    productId: "pro_monthly",
    placement: "paywall"
  }
});

Use purchase when money was actually captured or a paid conversion happened. purchase must include value or amountMinor plus currency.

await attry.purchase({
  value: 31.42,
  currency: "USD",
  productId: "pro_monthly",
  transactionId: "txn_123",
  store: "play_store",
  properties: {
    plan: "monthly"
  }
});

Attry stores revenue as stable minor-unit fields, so campaign revenue is not guessed from arbitrary custom properties.

Standard events

Attry accepts custom event names, but these standard names are reserved for dashboard reporting:

| Event | Sent by | Purpose | | --- | --- | --- | | install | SDK | First SDK install for the current app installation. | | open | SDK | App opened or became active. | | session_started | SDK | A new app usage session started. | | session_ended | SDK | A session ended after backgrounding or timeout. | | app_foreground | SDK | App returned to the foreground. | | app_background | SDK | App moved to the background. | | deep_link_opened | SDK | App opened from a deep link, universal link, or app link. | | initiate_purchase | App | User started a purchase or subscription flow. | | purchase | App | Paid conversion or purchase revenue. Requires revenue. |

Everything else can be sent as a custom event with track("your_event_name", { properties }).

Configuration

const attry = await createAttryCapacitor({
  appId: "457064853",
  apiKey: "attry_live_...",
  autoTrackLifecycleEvents: true,
  autoTrackDeepLinks: true,
  autoCollectInstallAttribution: true,
  sessionTimeoutMs: 30 * 60 * 1000,
  context: {
    appName: "Noteasy"
  }
});

Useful options:

  • endpoint: custom Attry API endpoint. Defaults to https://api.attry.io.
  • autoTrackLifecycleEvents: disable automatic lifecycle events when set to false.
  • autoTrackDeepLinks: disable automatic deep link tracking when set to false.
  • autoCollectInstallAttribution: disable Apple AdServices and Play Install Referrer collection when set to false.
  • context: extra app, device, or release metadata attached to every event.

Need help?

Email [email protected] or open the Attry dashboard.