Log in
Log in
ANAPixelsAttributionAnalyticsAds
Z1
AI Storefront Builder
All products
WorkServicesPricingAboutHelp
Get in Touch

Pixels

/

3 min read

What the Zalify Pixel does

Meet the Zalify Pixel — one script tag that handles tracking, ad-platform forwarding, popups, and lead capture.

The Zalify Pixel is a single JavaScript file — pixel.js — that you add to your site once. From that one script tag it tracks visits, forwards conversions to your ad platforms, shows popups, and captures leads. There's no npm package to install and nothing to wire up per page.

This article explains what the Pixel does so you know what you're turning on before you install it.

One script, five jobs

Add the Pixel once and you get:

  • Page-view tracking — automatically records the initial page load and every route change in single-page apps (using the Navigation API or history patching), so you don't lose views to client-side navigation.
  • Custom event tracking — send your own events, identify visitors, and set persistent properties through window.zalify(...).
  • Ad-platform forwarding — mirrors your standard commerce events to Meta, Google, GA4, TikTok, Pinterest, Snapchat, Bing, X, Reddit, and LinkedIn. No per-event code.
  • Popups — configuration-driven popups (modal or corner) with A/B testing, spin-to-win, copy-coupon, and consent buttons.
  • Lead capture — popup forms and your own forms submit to Zalify, subscribing visitors to a List and firing a lead event.

It stays light

The Pixel only loads what your workspace actually uses:

  • The ad-forwarding runtime (forward.js, ~5 kB gzipped) loads only if your workspace has ad-platform IDs configured. No ad IDs, no download.
  • The popup runtime (popup.js, ~4 kB gzipped) loads only the first time a popup is triggered.
  • A pre-load queue buffers any calls you make before the script finishes loading, so events fired during page hydration are never dropped.

Each workspace's behavior comes from a configuration fetched from Zalify at boot, so most of what the Pixel does is controlled from your dashboard — not from code on your site.

Works anywhere

The Pixel is plain JavaScript with no build step. It runs on vanilla HTML and on Next.js, Remix, Vue, Svelte, and Astro alike.

What you'll need

To install the Pixel you need your workspace ID (wid). You'll find it in your Zalify dashboard — it's the ID that scopes tracking, popups, and lead capture to your store.

Next steps

Next

Add the Zalify Pixel to your site