Skip to main content
These examples show the Tappd Web SDK applied to real-world scenarios. Each section is self-contained — copy the code, swap in your own values, and drop it into your project. All examples assume you have already initialized the SDK with your appId.
Track the full purchase funnel from product discovery through checkout, and capture cart abandonment for retargeting.Product purchase flow:
Cart abandonment tracking:
Capture the complete sign-up and login lifecycle — including failures — so you can analyze drop-off and optimize your onboarding funnel.Sign-up flow:
Login flow:
Logout:
Instrument multi-step forms to understand where users engage, hesitate, or drop off.
Track plan changes and update user attributes in a single flow so your customer profiles stay current.Plan upgrade:
Subscription cancellation:
Use a lightweight hook for simple components, or set up a Context provider to share the SDK instance across your entire app.useTappd hook:
React Context provider/consumer:
Create a composable that initializes the SDK on mount and exposes it reactively throughout your Vue app.
Initialize the SDK in your root layout using useEffect and clean up with reset() when the component unmounts.
For the Pages Router, initialize the SDK inside _app.js so the instance is created once and shared across all pages.
Capture unhandled JavaScript errors and promise rejections to monitor application health alongside your user behavior data.
Track experiment exposure and conversions to measure the impact of each variant directly within Tappd.
Instrument native HTML5 <video> elements to measure play rate, pause behavior, and completion rate.