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

mobiqo-capacitor

v1.0.0

Published

Mobiqo SDK for Capacitor apps - Mobile analytics and user tracking

Readme

Mobiqo Capacitor SDK

⚠️ THIS PLUGIN HAS TO BE USED ALONG WITH THE ANALYTICS SERVICE MOBIQO ⚠️

👉 CREATE AN ACCOUNT HERE: https://getmobiqo.com?utm_source=npm


A Capacitor plugin for integrating Mobiqo analytics into your mobile applications.

Installation

npm install mobiqo-capacitor

Usage

Import the SDK

import Mobiqo from 'mobiqo-capacitor';
import { MobiqoEvent } from 'mobiqo-capacitor';

Initialize the plugin

const mobiqo = new Mobiqo();

// Initialize with your Mobiqo API key
await mobiqo.init({ mobiqoKey: 'your-mobiqo-api-key' });

Sync user data

// With additional data (optional)
await mobiqo.syncUser({
  revenue_cat_user_id: 'user-123',
  include_advanced_analysis: false,
  additional_data: {
    user_id: 'user-123',
    user_name: 'John Doe',
    user_email: '[email protected]',
    referrer: 'google'
  }
});

// Without additional data
await mobiqo.syncUser({
  revenue_cat_user_id: 'user-123'
});

Track events

// Track an event with additional data (optional)
await mobiqo.trackEvent(
  'button_clicked',
  MobiqoEvent.CLICK,
  {
    button_name: 'subscribe',
    screen: 'home'
  }
);

// Track an event without additional data
await mobiqo.trackEvent('screen_opened', MobiqoEvent.SCREEN_VIEW);

Update user data

// Update user information without creating a new session
await mobiqo.updateUser({
  revenue_cat_user_id: 'user-123',
  additional_data: {
    user_id: 'user-123',
    user_name: 'John Doe Updated',
    user_email: '[email protected]',
    referrer: 'facebook'
  }
});

Get user information

const userInfo = await mobiqo.getUserInfo({
  revenue_cat_user_id: 'user-123',
  include_advanced_analysis: true
});

Automatic Session Tracking

The SDK automatically sends heartbeats every 20 seconds after user sync to maintain session tracking. No manual intervention is required.

API Reference

Methods

init(options)

Initialize the Mobiqo service with your API key.

  • options.mobiqoKey (string): Your Mobiqo API key

syncUser(options)

Sync user data with Mobiqo and start a session.

  • options.revenue_cat_user_id (string): RevenueCat user ID
  • options.include_advanced_analysis (boolean, optional): whether or not to include advanced analysis in the response (to get the purchase probability and other data, but the request will take more time)
  • options.additional_data (AdditionalData, optional): Additional user data (user_id, user_name, user_email, referrer)

updateUser(options)

Update user information without creating a new session.

  • options.revenue_cat_user_id (string): RevenueCat user ID
  • options.additional_data (AdditionalData, optional): Additional user data to update (user_id, user_name, user_email, referrer)

getUserInfo(options)

Retrieve user information from Mobiqo.

  • options.revenue_cat_user_id (string): RevenueCat user ID
  • options.include_advanced_analysis (boolean): whether or not to include advanced analysis in the response (to get the purchase probability and other data, but the request will take more time)

trackEvent(event, eventType, additionalData?)

Track custom events.

  • event (string): Event name
  • eventType (MobiqoEvent): Event type from the MobiqoEvent enum
  • additionalData (Record<string, any>, optional): Additional event data

Event Types

enum MobiqoEvent {
  CLICK = 'click',
  ACTION = 'action',
  SCREEN_VIEW = 'screen_view',
  PAYWALL_VIEW = 'paywall_view',
  PAYWALL_DISMISS = 'paywall_dismiss',
  PURCHASE_ATTEMPT = 'purchase_attempt',
  PURCHASE_SUCCESS = 'purchase_success',
  PURCHASE_FAILED = 'purchase_failed',
  FORM_SUBMIT = 'form_submit',
  NAVIGATION = 'navigation',
  ERROR = 'error',
  CUSTOM = 'custom'
}

Response Interfaces

SyncUserResponse

interface SyncUserResponse {
  isNewUser: boolean;
  appUser: AppUser;
  statistics: Statistics;
}

GetUserInfoResponse

interface GetUserInfoResponse {
  appUser: AppUser;
  statistics: Statistics;
}

AppUser

interface AppUser {
  id: string;
  project_id: string;
  revenue_cat_user_id?: string;
  mobiqo_username: string;
  os: 'ios' | 'android';
  os_version: string;
  app_version: string;
  country?: string;
  language?: string;
  first_seen_at: string;
  last_seen_at: string;
  active_entitlements: string[];
}

Statistics

interface Statistics {
  purchasing_power_parity: number;
  purchase_intent: number;
  avg_arpu: number;
  avg_arppu: number;
  avg_ltv: number;
}

AdditionalData

interface AdditionalData {
  user_id?: string;
  user_name?: string;
  user_email?: string;
  referrer?: string;
}

Requirements

  • Capacitor 3.0+
  • TypeScript 4.0+

License

MIT

Support

For support and questions, please contact the Mobiqo team.