Skip to main content

Via plugin

Create plugins/openrevenue.client.ts (the .client suffix ensures it only runs in the browser):
plugins/openrevenue.client.ts
Nuxt plugins ending in .client.ts are automatically excluded from SSR; no need for process.client guards.

Via nuxt.config

Alternatively, inject the script directly from nuxt.config.ts:
nuxt.config.ts

Verify

Deploy and open your site. A pageview should appear in your OpenRevenue dashboard within seconds.
OpenRevenue ignores localhost automatically. Test on your deployed URL.