Next.js — next/script "afterInteractive"
The default install pattern for Next.js sites. Next.js loads wire.js after the React app has hydrated and the page is interactive. Depending on how heavy the rest of the Next.js bundle is, this can be either before or after window.load — so V1’s outcome is timing-dependent. This is what lektik.com/campaign and most production Next.js installs look like.
Each side runs the same scenario in its own iframe. The iframes load independently, so you can see how each pixel version behaves under identical conditions.
How to test:
- Load the page and wait ~5 seconds.
- Compare window.load vs wire.js timing in the metrics row.
- Reload a few times — the result for V1 can flip between passes and fails because hydration timing varies.
Expected: V2 — always passes. V1 — flaky. This is the most important real-world scenario for the Next.js customer base because it represents the production install.
V1 · current pixel
Verdict
Initialising…
window.load
—
wire.js
—
pixel
—
Event timeline
- No events recorded yet…
Script tag for this scenario
<Script src="https://staging-api.wire.spbx.app/wire.js?account_id=79&property_id=6a2111320c2dee2dc5548935"
strategy="afterInteractive" />V2 · proposed fix
Verdict
Initialising…
window.load
—
wire.js
—
pixel
—
Event timeline
- No events recorded yet…
Script tag for this scenario
<Script src="https://staging-api.wire.spbx.app/wire.js?pixel_id=6a211df10c2dee2dc5548936&account_id=79&property_id=6a2111320c2dee2dc5548935"
strategy="afterInteractive" />