<script async> in <head>
The "official" install pattern that most documentation recommends — a single async script tag in the page head. Reliable on heavy pages where the rest of the page takes a moment to load, but race-prone on lightweight pages where the rest of the page finishes before wire.js has time to download. This is the baseline failure mode behind the V1 bug.
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 the timing of window.load vs wire.js in the metrics row.
- If wire.js arrived BEFORE window.load, V1 fires correctly. If wire.js arrived AFTER, V1 fails.
- Reload a few times — on a fast connection the outcome can flip from one load to the next.
Expected: V2 — always fires reliably, no matter the timing. V1 — outcome depends on the race. On this lightweight test page, V1 often loses; on a heavier real-world page, V1 often wins. That timing-dependence is the bug.
V1 · current pixel
Verdict
Initialising…
window.load
—
wire.js
—
pixel
—
Event timeline
- No events recorded yet…
Script tag for this scenario
<script type="text/javascript" async src="https://staging-api.wire.spbx.app/wire.js?account_id=79&property_id=6a2111320c2dee2dc5548935"></script>
V2 · proposed fix
Verdict
Initialising…
window.load
—
wire.js
—
pixel
—
Event timeline
- No events recorded yet…
Script tag for this scenario
<script type="text/javascript" async src="https://staging-api.wire.spbx.app/wire.js?pixel_id=6a211df10c2dee2dc5548936&account_id=79&property_id=6a2111320c2dee2dc5548935"></script>