Skip to main content
Pick the SDK that matches where your code runs. Use one SDK per runtime.

Time units differ between SDKs

Never copy a numeric configuration value from one SDK to another. timeout: 15000 means 15 seconds on React Native and 15,000 seconds on iOS. sessionTimeout: 60 means 60 milliseconds on the Web SDK, not 60 minutes.

Identity differs between SDKs

To join a server event to a browser visit, read datalyr.getVisitorId() in the browser. Pass that value as anonymousId from your server.

Authentication differs between SDKs

Copy the workspace ID from Settings → Install. Generate a write key under Settings → API. See API keys.
Use the write key, not the agent key. An agent key starts dk_agent_ and authenticates the read API only. Keep the write key on a server, since a write key in browser code lets anyone write to your workspace.

Choose an SDK

Web

Page views, campaign parameters, 15 click IDs, and Stripe link decoration.

Node.js

Trusted server events, with idempotency and drop callbacks.

iOS

Native Swift, with SKAdNetwork, Apple Search Ads, and App Tracking Transparency.

React Native

React Native and Expo, with Play Install Referrer and SKAdNetwork.

Verify

Install one SDK. Open Events. Confirm the first event arrives within 30 seconds. If nothing arrives, see No events.