1.0.4 • Published 9 months ago

subgang-sdk v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Subgang SDK

Subgang SDK is a lightweight library for React Native applications that helps track install and session data.

Installation

Features

  • Log session data including device information and app details
  • Track install events
  • Associate user IDs with sessions
  • Retrieve device ID

Usage

Initializing the SDK

import SessionLogger from 'subgang-sdk';
const logger = await SessionLogger.init('your-api-key');

You can also initialize with a user ID:

const logger = await SessionLogger.init('your-api-key', 'user-id');

Setting User ID

await logger.setUserId('user123');

Getting Device ID

const deviceId = await logger.getDeviceId();
console.log('Device ID:', deviceId);

How it works

  • On initialization, the SDK logs a session, including whether it's a new install.
  • Device information is automatically collected and sent with each session log.
  • User IDs can be associated with sessions for user-specific tracking.

Note

Ensure you have the necessary permissions and comply with privacy regulations when using this SDK to collect and transmit user and device data.

Support

For issues and feature requests, please open an issue on our GitHub repository.

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago