Install guide · framework · ~3 min

Install Admaxxer on Nuxt

npm i admaxxer, register as a client plugin.

Nuxt 3 uses a .client.ts suffix to mark plugins as browser-only. Drop a plugin file in plugins/ and you are done.

Steps

  1. 1 Install the package

    Add admaxxer to your project.

    bash
    npm i admaxxer
  2. 2 Create a client plugin

    Create plugins/admaxxer.client.ts. The .client suffix tells Nuxt to run it only in the browser.

    plugins/admaxxer.client.ts ts
    import { initAdmaxxer } from 'admaxxer';
    
    export default defineNuxtPlugin(() => {
      initAdmaxxer({ websiteId: 'YOUR_WEBSITE_ID', domain: 'yourdomain.com' });
    });
  3. 3 Verify the install

    Load any public page on your site in a fresh browser tab. Within a few seconds, the Admaxxer dashboard realtime view should show the event. If nothing lands after 2 minutes, re-check the snippet is actually in the rendered HTML <head> (View Source, not just DevTools).

Verify installation

Troubleshooting

No events are showing up. What now?
Open DevTools Console and Network. Filter for script.js and /api/event. If they are blocked:csp, your Content Security Policy is blocking admaxxer.com — see /documentation/troubleshoot/csp. Also double-check that data-website-id matches the ID shown in your dashboard.
Events show up in staging but not production.
Confirm data-domain matches the production hostname exactly (no protocol, no trailing slash). Also confirm the website's Allowed Domains list in settings includes the prod domain.
My site is a single-page app — am I missing pageviews?
Use script.hash.js if you rely on location.hash routing. Otherwise the default script.js already hooks history.pushState/replaceState and tracks SPA navigations.