API and AuthenticationDOM Package
Overview
What the Tiquo DOM Package provides
DOM Package
The Tiquo DOM Package (@tiquo/dom-package) is a JavaScript SDK for browser-based Tiquo integrations. It provides customer authentication, first-party website analytics, customer data helpers, session management, and WebView token handoff.
Use the DOM Package when you control the JavaScript build for your website or app and want a typed SDK that works directly with the Client API.
What It Provides
| Area | Description |
|---|---|
| Setup | Install the package, get a public key, and initialize the SDK |
| Customer Authentication | Sign customers in with an email OTP flow |
| Website Analytics | Track first-party pageviews, custom events, and known-customer activity |
| Customer Data | Fetch and update customer profile, orders, bookings, enquiries, receipts, and companies |
| Session Management | Handle auth state changes, logout, token refresh, multi-tab sync, and cleanup |
| WebView Integration | Pass native app tokens into a WebView-hosted page |
| Dashboard Configuration | Configure public keys, allowed domains, OTP sender details, and session behavior |
DOM Package vs Hosted Package
Use the DOM Package for codebases where you control the JavaScript build, want TypeScript types, or need deeper application integration.
Use the Hosted Package for Webflow, Wix, Squarespace, Framer, Shopify, or other site builders where adding a hosted script tag is the easiest option.