Install guide · no-code · ~2 min

Install Admaxxer on Vercel v0

Ask v0 to patch layout.tsx.

v0 ships Next.js App Router code. Tell the AI to add the Admaxxer snippet in the root layout <head>, or follow the Next.js npm-package route for type safety.

Steps

  1. 1 Prompt v0

    Paste this into the v0 chat:

    text
    Add the Admaxxer analytics pixel to app/layout.tsx. Put this exact <script> tag inside the <head> element of the root layout:
    
    <script defer data-website-id="YOUR_WEBSITE_ID" data-domain="yourdomain.com" src="https://admaxxer.com/js/script.js"></script>
  2. 2 Replace placeholders

    Tell v0 the real website ID and domain, then ask it to update the generated layout.

  3. 3 Deploy to Vercel

    Accept v0's patch and deploy. The snippet is live immediately.

  4. 4 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.