Performance optimizer (NitroPack-style)
Mirrors what NitroPack and similar page-speed optimizers do to tracking scripts. To make pages "feel faster", they hold all non-critical scripts until the page has finished loading, then inject them in the background. The cost: any pixel that depends on the page-finished-loading event misses it entirely, because by the time the script arrives that event is gone. This is exactly what reproduces on gorayeb.com.
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.
- Watch the order in the metrics row: window.load fires first, then wire.js downloads ~500ms later.
- Look at the pixel column.
Expected: V1 — pixel never fires. By the time wire.js executes, window.load has already happened, so V1’s listener attaches too late and never runs. V2 — pixel fires the moment wire.js executes.
V1 · current pixel
Verdict
Initialising…
window.load
—
wire.js
—
pixel
—
Event timeline
- No events recorded yet…
Script tag for this scenario
// Injected ~500ms AFTER window.load fires <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
// Injected ~500ms AFTER window.load fires <script type="text/javascript" async src="https://staging-api.wire.spbx.app/wire.js?pixel_id=6a211df10c2dee2dc5548936&account_id=79&property_id=6a2111320c2dee2dc5548935"></script>