Ingest Data
Send product events and identity updates to Altertable with SDKs or direct HTTP requests. The same payload model writes to the built-in product_analytics catalog, so client, server, mobile, and batch sources can be analyzed together.
SDK quick start
Product Analytics SDKs follow the same mental model across languages:
- Initialize a client with your API key.
- Track events with event properties.
- Identify users and attach traits.
- Optionally alias related identities.
Language | Install | Repository |
|---|---|---|
TypeScript / JavaScript | npm install @altertable/altertable-js | |
React | npm install @altertable/altertable-js @altertable/altertable-react | |
Python | pip install altertable or poetry add altertable | |
Ruby | gem install altertable | |
Swift | Swift Package Manager | |
Kotlin / Android | JVM: implementation("ai.altertable.sdk:altertable-kotlin:0.1.0"); Android apps also add implementation("ai.altertable.sdk:altertable-android:0.1.0") |
SDK examples
Use these examples as the starting point for your application code:
import { altertable } from '@altertable/altertable-js';// Initialize with your API keyaltertable.init('YOUR_API_KEY', {environment: 'production',});// Track a user eventaltertable.track('checkout_completed', {revenue: 49.99,plan: 'pro',currency: 'USD',});// Identify a useraltertable.identify('user_abc123', {plan: 'pro',});
Client-side vs server-side SDKs
SDKs fall into two categories with different capabilities:
Capability | Client-side | Server-side |
|---|---|---|
Event tracking | Yes | Yes |
User identification | Yes | Yes |
Aliasing | Yes | Yes |
Automatic page/screen tracking | Yes | No |
Session and device ID management | Automatic | You pass distinct_id on each call |
Tracking consent | Built-in | Manage externally |
Event queuing and offline support | Yes | No |
Page, screen, and consent helpers
Client-side SDKs can automatically capture page views or screen views:
// Disable auto-capture if you need manual controlaltertable.init('YOUR_API_KEY', { autoCapture: false });// Then track page views manuallyaltertable.page('https://example.com/products');
They also include built-in consent management for privacy compliance:
// JavaScript — initialize with consent pendingaltertable.init('YOUR_API_KEY', { trackingConsent: 'pending' });// Later, when the user grants consentaltertable.configure({ trackingConsent: 'granted' });
Authentication
Authenticate Product Analytics SDKs and API requests with environment-specific API keys for staging and production data.Track
Track product events from SDKs or direct API clients.Identify
Identify users so product events can be connected to stable people and traits.Alias
Link multiple identifiers to one user profile when you need explicit identity merges.