Quick Start
For developers
The fastest path to your first events. New to Segmentify? Read What is Segmentify? first for the big picture.
Quick start path
Follow this order:
- Configure SDK options (
apiKey, API URLs, language, currency). - Initialize SDK once at app startup.
- Attach
navigationObservertoNavigationContainer. - Trigger the initial page view.
- Send at least one business event (for example
ProductVieworBasketAdd).
1) Prepare configuration
Create a configuration object similar to shared/segmentify-configuration.ts:
config.segmentifyApiUrl: Segmentify event endpoint baseconfig.segmentifyPushUrl: push endpoint base (if push is enabled)config.apiKey: your Segmentify API keyconfig.domain: your app domainconfig.languageandconfig.currencypageTypeMapping: map screen names to page types
2) Initialize the SDK
In your app root, instantiate once:
const segmentify = new Initialize(SEGMENTIFY_CONFIGURATION);This initialization stores configuration, stores device information, and prepares session/user IDs.
3) Send your first business event
Example from product detail flow:
await events.ProductView({ productId: product.id, title: product.name, price: product.price,});Then test add-to-cart:
await events.BasketAdd({ productId: product.id, quantity: 1, price: product.price,});Verify
- Build and run app.
- Navigate between screens.
- Open product detail.
- Add to cart.
- Confirm logs/network calls include
PAGE_VIEW,PRODUCT_VIEW, andBASKET_OPERATIONS(step: add).
Next: read Project Setup for repository-specific integration details.