Install Bily
Expose one public runtime value
Copy the complete tracking URL from Bily > Settings > Apps > More settings > Install tracking..env
nuxt.config.ts
runtimeConfig.public.
Add one client plugin
In Nuxt 4, createapp/plugins/bily.client.ts. In a Nuxt 3 project without the app/ directory structure, create plugins/bily.client.ts.
app/plugins/bily.client.ts
.client suffix keeps startup in the browser. The browser script records the initial page automatically.
The browser script records the initial page and supported client-side navigation automatically. Do not add manual PageView calls for those navigations; use track() for business events.
Track successful actions
Calltrack() from a component or composable after the named operation completes.
app/components/CompleteCheckoutButton.vue
Change the URL safely
When Bily validates a customer subdomain, replaceNUXT_PUBLIC_BILY_SCRIPT_URL with the new complete value. Update the deployment environment, then restart or redeploy as your hosting setup requires.
Never run the old and new URLs together.
Verify Nuxt tracking
Confirm the first page, path changes, and query-only routes appear once.
Move to first-party tracking
Validate, replace, deploy, and verify the customer-subdomain URL.