WebmasterID logoWebmasterID
Case study

BuildDesignHub: first real-site integration

An internal implementation case study covering the install, verification, and operational behavior of WebmasterID on a publisher Next.js site.

Internal case study — not a customer endorsement.

BuildDesignHub is a publisher-style Next.js site (App Router) covering construction, architecture, and design topics. It was chosen as the first real-site integration because it exercises the parts of WebmasterID that matter for the audience the product is built for: server-rendered content with client-side navigation, programmatic editorial pages, and the kind of AI crawler activity publishers care about.

Installation

The integration is a single script tag, mounted via Next.js's <Script> component with strategy="afterInteractive":

<Script
  id="webmasterid-tracker"
  src="https://webmasterid.com/tracker.iife.min.js"
  strategy="afterInteractive"
  data-wmid="wm_xxxxxxxxxxxxxxxx"
  data-endpoint="https://webmasterid-ingest-api.vercel.app/api/events"
/>

That's the entire customer-side surface. No CMP integration, no consent SDK, no tag manager — the publisher is responsible for any disclosure their jurisdiction requires.

Verification

The browser path was verified end-to-end via Playwright against the live site. Three flows, each a separate test:

  • Hard reload on /insights/building-permits-explained with ?utm_source=manual&utm_medium=browser&utm_campaign=cors_fix_test: tracker fetched (200), event POSTed (202), Content-Type: text/plain;charset=UTF-8, payload contains the correct site_id, pathname, and UTM values.
  • Manual API: window.WebmasterID.pageView({pathname: "/manual-test-path"}) from the page console. Override pathname appears in the stored event.
  • SPA navigation: load /, click an internal link to /insights. Both events fire via the tracker's history.pushState hook. No duplicate bursts, no missed routes.

All four expected events landed in the dashboard within seconds of being sent. No DNT/GPC was active in the test browser; no console errors were reported.

AI crawler detection in production

BuildDesignHub's published content is exactly the kind of surface AI crawlers visit. The AI Visibility page in the dashboard surfaces those visits separately from human page views — see /ai-visibility for the full classifier list. Bot visits are written to bot_visits, never to the events table, so human aggregates stay clean by construction.

What we learned

Two things surfaced that mattered:

  • Platform-level CORS. Vercel's edge layer unconditionally adds ACAO: * on responses, which made a credentialed-preflight strategy unwinnable. Switching the tracker to a plain-string sendBeacon body (Content-Type text/plain;charset=UTF-8) sidesteps preflight entirely and was the actual fix.
  • esbuild IIFE globalName. An esbuild globalName on the IIFE bundle was overwriting the in-module globalThis.WebmasterID = api assignment with the module's exports object, breaking window.WebmasterID.pageView(). Removing the globalName fixed it without changing any runtime code.

Both fixes are documented in the repository's commit history. Neither required schema or analytics-logic changes.

Status

BuildDesignHub is the first production integration of WebmasterID. The relationship is operational, not a public customer endorsement — this case study is published for transparency about how WebmasterID behaves on a real site.

For where to go next: /architecture, /use-cases, /blog.