Use the values shown in Settings. Customers do not need to install sdk-core directly.
The SDK records lifecycle, session, and deep link open events where platform hooks are available.
Send app-specific actions with structured properties for dashboard filtering later.
Event tracking setup
The minimum production flow is initialize, verify auto events, then wire the events that define user quality and revenue.
Install the platform package
Use @attryio/react-native for React Native or @attryio/capacitor for Capacitor. Do not install sdk-core directly in customer apps.
Initialize once
Initialize Attry at app startup with the App ID and Live SDK key from Settings.
Track product events
Use track for custom behavior, initiatePurchase for purchase intent, and purchase for revenue.
Validate in Events
Open the Events page in the dashboard and confirm event name, count, campaign, source, revenue, store, and time.
Common logging calls
React Native setup
React Native apps should install the Attry React Native package and initialize it once near app startup. The package includes the shared event queue, batching, retry behavior, lifecycle tracking, deep link handling, Android Install Referrer hooks, and iOS AdServices hooks when native bridges are available.
Capacitor setup
Capacitor apps should install the Attry Capacitor package, sync native projects, and initialize Attry from the app startup path. The SDK uses Capacitor App and Device APIs for lifecycle and device context where possible.
Custom event tracking
Use custom events for app-specific actions that are not covered by standard event names. Event names should be snake_case and stable. Details belong in properties, not in the event name.
Revenue event tracking
Use helper methods for revenue events. The SDK accepts decimal value for developer ergonomics, converts it to minor units, and sends the normalized revenue object to the API. This keeps dashboard revenue accurate across platforms.
Device and app context
The SDK collects non-sensitive app and device context where platform APIs expose it: app version/build, OS version, device model, locale, timezone, country code, screen size, and SDK version. Location is not GPS by default; Attry uses SDK-provided context and trusted request headers for country, region, and city rollups.
Troubleshooting
Events do not appear in the dashboard
Check that the App ID and Live SDK key match the selected app in Settings, then confirm the device can reach api.attry.io.
Revenue is missing
Use attry.purchase. Purchase requires value or amountMinor and currency.
Too many event names
Keep event names stable and move variants into properties. This keeps the Events table and campaign reports readable.
React Native example
The same event methods are available from the Capacitor package after initialization.
import { createAttryReactNative } from "@attryio/react-native";
const attry = await createAttryReactNative({
appId: "457064853",
apiKey: "attry_live_..."
});await attry.initiatePurchase({
properties: { screen: "pro_paywall", plan: "monthly" }
});
await attry.purchase({
value: 31.42,
currency: "USD",
productId: "pro_monthly",
transactionId: "txn_123"
});Do customers need @attryio/sdk-core?
No. Customer apps should install @attryio/react-native or @attryio/capacitor. The sdk-core package is an internal shared engine used by those platform packages.
Can I pass custom parameters?
Yes. Pass custom parameters through properties. They are stored with the event and can be used later for filtering, validation, and product analytics.
Which event is required for revenue?
Use purchase for one-time purchases, subscription conversions, and subscription revenue. It must include value or amountMinor plus currency.
