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

seinetime-universal-sdk

v0.1.12

Published

Universal analytics SDK for React Native applications from Seinetime

Readme

Seinetime React Native SDK

Universal analytics SDK for React Native, iOS, and Android applications.

npm version License: MIT Platform

Installation

⚠️ Important: This SDK requires React Native's New Architecture (0.70+). It will not work with the old architecture.

npm install seinetime-universal-sdk
# or
yarn add seinetime-universal-sdk

iOS Setup

After installing the package, install the iOS dependencies:

cd ios && pod install && cd ..

Android Setup

The package uses autolinking for Android. No additional setup required.

Rebuild Your App

After installation, rebuild your app to link the native modules:

# For iOS
npx react-native run-ios

# For Android
npx react-native run-android

Quick Start

import Seinetime from 'seinetime-universal-sdk';

// Initialize SDK (call this once when your app starts)
async function initAnalytics() {
  await Seinetime.setup({
    secretKey: 'your-secret-key-here',
    environment: 'production'
  });
}

// Track custom events
Seinetime.track('button_clicked', {
  button_name: 'signup',
  screen: 'home'
});

// Track screen views
Seinetime.screen('home_screen', {
  category: 'onboarding'
});

// Identify users
Seinetime.identify('user-123', {
  email: '[email protected]',
  plan: 'premium'
});

Important Notes:

  • Call setup() before using any other SDK methods
  • setup() is asynchronous - use await or .then() to ensure initialization completes
  • Initialize the SDK as early as possible in your app lifecycle (e.g., in App.tsx)

Configuration

Configuration Options

| Option | Type | Required | Default | Description | |--------|------|----------|---------|-------------| | secretKey | string | Yes | - | Your Seinetime API secret key | | identifySecretKey | string | No | - | Optional key for user identification | | environment | string | No | 'production' | Environment: 'production', 'staging', or 'test' |

Example Configuration

await Seinetime.setup({
  secretKey: 'your-secret-key-here',
  identifySecretKey: 'your-identify-key', // Optional
  environment: 'production' // Optional: 'production', 'staging', or 'test'
});

Getting API Keys

To obtain your secretKey and optional identifySecretKey:

  1. Sign up at seinetime.ai
  2. Create a new project in your dashboard
  3. Copy your API keys from the project settings

Requirements

  • React Native: 0.70 or higher with New Architecture enabled
  • iOS: 11.0 or higher
  • Android: API level 21 (Android 5.0) or higher
  • Note: This SDK is built as a TurboModule and requires the New Architecture. It will not work with the old architecture or Expo managed workflow.

API Reference

setup(config: SeinetimeConfig): Promise<void>

Initialize the SDK with your configuration. Must be called before using other methods.

Parameters:

  • config.secretKey (required): Your Seinetime API key
  • config.identifySecretKey (optional): Key for user identification
  • config.environment (optional): Target environment

Throws:

  • Error if secretKey is missing
  • Error if SDK is already initialized

track(eventName: string, properties?: EventProperties): void

Track a custom analytics event.

Parameters:

  • eventName (required): Name of the event
  • properties (optional): Event properties as key-value pairs (string values only)

Example:

Seinetime.track('purchase_completed', {
  product_id: '12345',
  amount: '99.99',
  currency: 'USD'
});

screen(screenName: string, properties?: EventProperties): void

Track a screen view.

Parameters:

  • screenName (required): Name of the screen
  • properties (optional): Screen properties as key-value pairs (string values only)

Example:

Seinetime.screen('product_details', {
  product_id: '12345',
  category: 'electronics'
});

identify(userId: string, traits?: EventProperties): void

Identify a user with their unique ID and optional traits.

Parameters:

  • userId (required): Unique identifier for the user
  • traits (optional): User traits as key-value pairs (string values only)

Example:

Seinetime.identify('user-123', {
  email: '[email protected]',
  name: 'John Doe',
  plan: 'premium'
});

Example App

A complete example application is available in the example directory.

Running the Example

cd example

# Install dependencies
npm install

# iOS: Install pods
cd ios && pod install && cd ..

# Run on iOS
npx react-native run-ios

# Run on Android
npx react-native run-android

The example demonstrates:

  • SDK initialization
  • Event tracking
  • Screen tracking
  • User identification
  • Error handling

Troubleshooting

Module not found

Problem: Error: Unable to resolve module "seinetime-universal-sdk"

Solutions:

  1. Ensure the package is installed: npm install seinetime-universal-sdk
  2. Clear Metro bundler cache: npx react-native start --reset-cache
  3. Reinstall dependencies: rm -rf node_modules && npm install
  4. For iOS: cd ios && pod install && cd ..

Setup Promise never resolves

Problem: setup() call hangs and never completes

Solutions:

  1. Verify your secretKey is correct
  2. Check your network connection
  3. Try a different environment setting ('test' or 'staging')
  4. Check native logs for errors:
    • iOS: Open Xcode console
    • Android: Run npx react-native log-android

Events not appearing in dashboard

Problem: Tracked events don't show up in your Seinetime dashboard

Solutions:

  1. Ensure setup() was called and completed before tracking events
  2. Verify you're using the correct secretKey for your environment
  3. Check the environment setting matches your dashboard
  4. Allow a few minutes for events to appear (they may be batched)
  5. Check your network connection and firewall settings

Need more help?

License

MIT License - see the LICENSE file for details.

Contact

Seinetime


Made with ❤️ by Seinetime