Skip to content

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:

  1. Configure SDK options (apiKey, API URLs, language, currency).
  2. Initialize SDK once at app startup.
  3. Attach navigationObserver to NavigationContainer.
  4. Trigger the initial page view.
  5. Send at least one business event (for example ProductView or BasketAdd).

1) Prepare configuration

Create a configuration object similar to shared/segmentify-configuration.ts:

  • config.segmentifyApiUrl: Segmentify event endpoint base
  • config.segmentifyPushUrl: push endpoint base (if push is enabled)
  • config.apiKey: your Segmentify API key
  • config.domain: your app domain
  • config.language and config.currency
  • pageTypeMapping: 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, and BASKET_OPERATIONS (step: add).

Next: read Project Setup for repository-specific integration details.