5 min
Average setup time
1 line
Of code to start
10K+
Apps using our SDK
99.9%
Uptime SLA
How to integrate AppStoreSpy
2
Install the SDK
Choose your preferred package manager to install our SDK.
bash
npm install @appstorespy/sdk3
Initialize the SDK
Add this code to your app's entry point to start tracking.
javascript
// Initialize AppStoreSpy
import AppStoreSpy from '@appstorespy/sdk';
const appStoreSpy = new AppStoreSpy({
appId: 'YOUR_APP_ID',
apiKey: 'YOUR_API_KEY',
environment: 'production', // or 'development'
autoTrack: true, // Automatically track page views and events
debug: false // Set to true for development
});
// Track a custom event
appStoreSpy.track('user_signup', {
plan: 'pro',
source: 'pricing_page'
});
// Identify a user
appStoreSpy.identify('user_123', {
name: 'John Doe',
email: 'john@example.com',
plan: 'pro'
});Tip: Replace 'YOUR_APP_ID' and 'YOUR_API_KEY' with your actual credentials from the dashboard.
4
Start Tracking Events
Track custom events, user actions, and monitor performance.
javascript
// Track page views (auto-tracked if enabled)
appStoreSpy.pageView('dashboard');
// Track custom events
appStoreSpy.track('purchase_completed', {
product_id: 'prod_123',
amount: 49.99,
currency: 'USD'
});
// Track user properties
appStoreSpy.identify('user_123', {
plan: 'pro',
referral_source: 'google'
});Supported Frameworks & Platforms
React
React & Next.js
Vue.js
Vue & Nuxt
Angular
Angular 2+
iOS
Swift & Objective-C
Android
Kotlin & Java
React Native
Cross-platform
Node.js
Backend tracking
Python
Django & Flask