Get your App ID
Every SDK call is tied to a Tappd app. Before you write any code, grab the App ID for the application you want to instrument.
- Log in to your Tappd Dashboard.
- Navigate to Settings → Apps.
- Create a new app or select an existing one.
- Copy the App ID — it looks like
a1b2c3d4-e5f6-7890-abcd-ef1234567890.
Install the SDK
Choose the installation method that matches your project setup.
The CDN build exposes the SDK as
TappdSDK.TappdSDK on the global window object. The NPM build uses named exports, so you import TappdSDK directly.Initialize the SDK
Call Replace
new TappdSDK(config) once when your application loads — not on every page render. Initializing the SDK starts a session and, if autoTrack is enabled, records the first page view immediately.YOUR_APP_ID with the ID you copied from the dashboard.Identify users
Call
tappd.identify() as soon as you know who the current user is — typically after login or signup. The SDK automatically merges any anonymous activity recorded before identification with the user’s profile.The
external_id field is your application’s user identifier (for example, a UUID or any unique, stable ID from your system). The SDK generates and manages its own session-level identifier automatically — you don’t need to create or pass one.Track events
Use Event names can be any string. Use consistent naming across your app — for example,
tappd.track() to record any meaningful action in your application. Pass an event name and an optional properties object.snake_case — so your analytics data stays clean and queryable.Framework-specific setup
The SDK is framework-agnostic, but each framework has its own lifecycle conventions. Use the tab for your stack to see the recommended initialization pattern.- React
- Vue.js
- Next.js
Initialize the SDK inside a
useEffect with an empty dependency array so it runs once after the component mounts. Store the instance on window (or in a React Context) so other components can access it without re-initializing.Verify your installation
Enabledebug: true during development to confirm the SDK initialized correctly. Open your browser’s developer console and look for log output like the following:
debug back to false before deploying to production.
Next steps
Configuration Reference
Fine-tune session timeouts, message polling, auto-capture, and more.
API Reference
Explore every method available on the
TappdSDK instance.In-App Messages
Display banners, popups, and modals triggered by user behavior.
Examples
Browse real-world code samples for common use cases.