Web in four steps
The shortest path to a working web integration. Every step is the minimum that works, with no options. For anything beyond that, each step links to the Web SDK reference, which is where the detail lives.
Four steps, not five. A website needs no native link setup, and it does not report opens: a browser reaching a Tolinku link already reached the server, so the tap was counted when the page was served.
1. Install
Section titled “1. Install”npm install @tolinku/web-sdkOr without a build step, which defines a global Tolinku:
<script src="https://cdn.jsdelivr.net/npm/@tolinku/web-sdk/dist/tolinku.min.js"></script>2. Configure
Section titled “2. Configure”import { Tolinku } from '@tolinku/web-sdk';
const tolinku = new Tolinku({ apiKey: 'tolk_pub_your_key' });Get the key from the dashboard under API keys. The publishable key
(tolk_pub_) is the right one for a browser, because it ships to everyone who
loads the page.
baseUrl defaults to https://api.tolinku.com. Set it to your Appspace’s
domain if you use a custom domain.
3. Track an event
Section titled “3. Track an event”tolinku.track('custom.signup_complete');Custom event types must start with custom. and use lowercase letters, numbers
and underscores. Events batch automatically and go out on page unload via
sendBeacon, so you do not need to flush them yourself.
4. Show a smart banner
Section titled “4. Show a smart banner”await tolinku.showBanner();That shows the highest-priority active banner configured in the dashboard. A tap on its call to action reports a banner click, which needs web SDK 0.8.0 or later.
That is a working integration. For referrals, in-app messages, ecommerce events, resolving incoming links, claiming a deferred link and every option on the calls above, go to the Web SDK reference.
Building a mobile app instead? Start at iOS, Android, Flutter or React Native.