Skip to main content
Use one client-only Nuxt plugin. It starts Bily once; the browser script records navigation automatically. Do not add a raw Bily script or another tracking plugin alongside the SDK.

Install Bily

Expose one public runtime value

Copy the complete tracking URL from Bily > Settings > Apps > More settings > Install tracking.
.env
Declare the matching public runtime value.
nuxt.config.ts
The URL is visible in the browser by design. It is not a private token. Keep credentials out of runtimeConfig.public.

Add one client plugin

In Nuxt 4, create app/plugins/bily.client.ts. In a Nuxt 3 project without the app/ directory structure, create plugins/bily.client.ts.
app/plugins/bily.client.ts
The .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

Call track() from a component or composable after the named operation completes.
app/components/CompleteCheckoutButton.vue

Change the URL safely

When Bily validates a customer subdomain, replace NUXT_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.