博客新文——认识三个智能体:Z1、Reach 和 Ana
注册
注册
Z1
创意设计与建站
图片与视频邮件弹窗与表单AI 建站落地页即将推出
Mogiu达人与联盟营销
全部产品
店铺搭建达人营销付费广告全部服务
价格
联系我们

像素

/

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, hosted inline 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.
  • The form runtime (form.js) loads only when a hosted inline form is shown.
  • 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

下一篇

Add the Zalify Pixel to your site