← All scenarios

Duplicate install + wrapper chain

What happens when wire.js is installed more than once on the same page — typically because someone added the pixel both in the website theme AND in a tag manager, or because two marketing teams installed it independently. Common in practice, easy to miss until counts look off. This test also verifies V2’s SPA support behaves correctly under N installs: each install adds one layer to a "wrapper chain", and the test confirms all layers fire correctly on a single navigation.

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:
  1. Both iframes start with 2 wire.js installs. Note the starting pixel count in each column.
  2. In the V2 column, click "+1 install". Pixel count should go up by exactly 1 — every V2 install fires its own pixel on execute.
  3. Click "+3 installs". Pixel count goes up by 3.
  4. Now click "pushState" in V2. With N installs, every wrapper in the chain fires on a single navigation — so pixel count should go up by exactly N. The hint next to the button shows the expected number.
  5. Try +5 installs (rapid) followed by pushState to stress-test the chain.
Expected: V1 — stays at pixel ×0 or ×1 the entire time. The race condition prevents most installs from firing, and V1’s internal dedup means even when one fires, additional installs don’t. V2 — pixel count equals the install count after initial loads, then increments by the install count on each pushState click.
V1 · current pixel
Verdict
Initialising…
window.load
—
wire.js
—
pixel
—
Event timeline
  1. No events recorded yet…
Script tag for this scenario
// Starts with 2 injects. Click "+N installs" to add more at runtime.
<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
  1. No events recorded yet…
Script tag for this scenario
// Starts with 2 injects. Click "+N installs" to add more at runtime.
// Each install adds one wrapper layer to history.pushState.
<script type="text/javascript" async src="https://staging-api.wire.spbx.app/wire.js?pixel_id=6a211df10c2dee2dc5548936&account_id=79&property_id=6a2111320c2dee2dc5548935"></script>