Install Bily
ready().
Start tracking once
Select your store. Then open Bily > Settings > Apps > More settings > Install tracking, choose your framework, and copy the exactscriptUrl from the SDK snippet.
analytics.ts
main.ts
init() loads the script.
Let Bily track navigation
The browser script records the initial page and supported client-side navigation automatically. Do not add manualPageView calls for those navigations; use track() for business events.
Choose how SDK updates arrive
Use one installation path for the website surface.- Bundled npm applications: keep the compatible major range saved by your package manager, update the lockfile, test, rebuild, and redeploy to receive a new SDK release. Do not enable automatic breaking-major upgrades.
- Browser modules without a bundler: the managed major-version URL below follows compatible 2.x releases as CDN and browser caches refresh on new page loads. An already-open page keeps its loaded code. This is not an immediate update guarantee.
- Copied or uploaded SDK assets, including Shopify theme files: those bytes remain unchanged until you replace and redeploy them. They do not become managed merely because the npm package was updated.
Use the managed browser module
Use this instead of the npm initializer when the site supports browser modules and you want compatible CDN updates without rebuilding the SDK file. Do not also install a second raw Bily tracking script. Keep the exact customer tracking URL from Bily; the CDN module is only the SDK loader.@2 in the managed URL to avoid an automatic breaking-major change. Your content security policy must permit the selected CDN module and your exact Bily tracking URL. If you require immutable asset review or a fixed integrity hash, pin a specific release and manage updates explicitly instead of using this moving URL.
The SDK’s in-memory queue is not durable delivery storage. Do not clear application-owned pending events or redirect solely because track() returned. Preserve consent and stable event IDs in your own retry or delivery contract.
Track successful actions
create-workspace.ts