---
title: How Personizely works
slug: how-personizely-works
description: How Personizely works: the per-site snippet, what happens on each page view, how changes go live, what's stored in the browser, and how orders are tracked.
docTags: 
createdAt: 2026-10-16T19:33:03.105Z
---

Personizely runs through one lightweight JavaScript snippet that is built for your website and served from a global CDN. The snippet decides which campaigns and widgets each visitor sees, applies them in the browser, and sends views, clicks and goal events to Personizely. On Shopify and Wix, purchases are recorded server-side from the platform's order data, and reports combine both sources.

## The pieces

| Piece                   | What it does                                                                                                                                                               |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Snippet**             | One script per website (`https://static.personizely.net/<your-key>.js`). It holds your active campaigns, widgets, targets and goals, and only the features your site uses. |
| **Personizely app**     | Where you build campaigns and widgets, set targeting and goals, and read reports.                                                                                          |
| **Event tracking**      | The snippet sends page views, campaign and widget views, clicks, form submits and goal events to Personizely.                                                              |
| **Platform connection** | On Shopify and Wix, the platform sends orders and product updates to Personizely directly. On Shopify, a web pixel also reports add to cart and checkout events.           |

## What happens on a page view

1. **The snippet loads** from the `<head>` of the page, synchronously or asynchronously depending on your [Performance and flicker](docId\:sgD1BsYNMvpjqHqp_qcdi).
2. **It checks whether it should run.** It stops for recognized bots and crawlers, when tracking is paused or your visitor quota is used up, when `?ply_disable=1` is in the URL, and when another copy of the snippet already ran on the page. See [When Personizely doesn't run](docId:12g74NGGqJmpD-AsS-XA3).
3. **It identifies the visitor.** New visitors get a visitor ID stored in a first-party cookie. On Shopify, Personizely uses Shopify's own visitor ID so the two match. See [Visitor identity, sessions and storage](docId\:pQ7hXClMZqGdoDSHsUCZ5).
4. **It resolves targeting.** Most filters, such as device, page, UTM parameters or cart contents, are evaluated in the browser. Filters that need stored history or location, such as visit history or country, are answered by a quick server lookup. See [How targeting works](docId\:pUBcmS1M98xB8Mg8L99D_).
5. **Campaigns run.** For each campaign that matches the page and the visitor, the snippet picks a variation (or reuses the one the visitor already has) and applies it. Content that is about to change is hidden until the change is applied, so visitors don't see the original flash. See [Performance and flicker](docId\:sgD1BsYNMvpjqHqp_qcdi).
6. **Widgets are armed.** Each widget whose rules pass waits for its trigger, such as exit intent or a scroll depth, and shows when the trigger fires.
7. **The page view is recorded**, along with campaign and widget views.
8. **Interactions are tracked** as they happen: clicks, form submits, scroll and time goals, custom events from the [JavaScript API (window.ply)](docId\:d64TegyOiwNA2GFG1eXPm), and the time spent on the page when the visitor leaves.

On Shopify, the order itself is recorded when Shopify notifies Personizely that it was paid (or created, if you choose). Personizely matches the order to the visitor server-side, using Shopify order data, and credits it to the campaigns and widgets the visitor saw within your [Revenue attribution](docId\:jpQKiTTVFyptseo8UEQOD). See [Shopify order tracking and profit](docId\:hS2Gsx3K3YcJ2NRssNAmX).

## How your changes go live

When you start, stop or edit a campaign or widget, or change a target, goal or setting that affects the storefront, Personizely updates your site's snippet. The new version is live within moments. You don't need to re-copy the code or republish your theme.

- Only **active** campaigns and widgets are part of the snippet. Drafts and paused items add nothing to your page weight.
- Features are included only when something uses them. A site with no wheel-of-fortune widgets, for example, doesn't load the wheel code.
- Your campaigns and widgets are delivered with the snippet itself, so showing them doesn't wait on an extra request. Only targeting that needs server data does.
- The **Snippet** card on the [Dashboard](docId\:FmKwGbgJbllAF3aR2nVdJ) shows whether the snippet is installed and tracking, its approximate size, and which features it currently includes.

## Single-page apps and headless storefronts

The snippet detects page changes made through the browser's History API, as used by single-page apps, Hydrogen and many headless storefronts. On each page change it re-checks targeting, records a new page view and re-evaluates campaigns and widgets for the new page. Changes to only the URL hash or query string don't count as a new page.

## What's stored in the visitor's browser

| Storage         | What it holds                                                                                                                               | How long                                                                           |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Visitor cookie  | The visitor ID. Set on your root domain so subdomains share it.                                                                             | **Settings → Tracking → Cookie lifetime**: 1, 2, 3, 4 or 5 years (default: 1 year) |
| Browser storage | What Personizely remembers about the visitor in this browser: assigned variations, widget frequency, traffic-source values and session data | Until cleared, or until the browser session ends for session data                  |

Browser storage is per domain, so assignments don't carry across different domains. See [Cookies and consent](docId:-HA6dgPmpYmb7x6UZQ_t2) for what to declare in your cookie policy and how consent is handled.

## When Personizely doesn't run

| Situation                                                                         | What visitors see                                          | What's recorded                                                                                                                                                          |
| --------------------------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Recognized bot or crawler                                                         | Your original site                                         | Nothing                                                                                                                                                                  |
| `?ply_disable=1` in the URL                                                       | Your original site                                         | Nothing                                                                                                                                                                  |
| Tracking paused in **Settings → Tracking**, or the monthly visitor quota exceeded | Your original site, with every campaign and widget stopped | No visits or events, and new visitors aren't tracked. On Shopify, orders from visitors who were already tracked are still attributed (quota isn't consumed while paused) |
| Visitor excluded by [Traffic filtering and bots](docId\:MWdeRj4GbBA4xc9hEv_mn)    | Your original site, with no campaigns or widgets           | Nothing                                                                                                                                                                  |
| Snippet installed twice                                                           | Only the first copy runs                                   | Normal tracking                                                                                                                                                          |

See [Plans, visitor quota and pausing](docId\:PcWtmn677CfNmjPJ58llM) for how the quota is counted.

## Page speed

- The snippet is small, specific to your site and served from a CDN close to the visitor.
- On Shopify, it keeps working when common ad-blockers are active.
- You choose between **asynchronous** loading (the default, never delays page rendering) and **synchronous** loading (prevents flicker in A/B tests). [Performance and flicker](docId\:sgD1BsYNMvpjqHqp_qcdi) explains the trade-off.

## Related

- [Install Personizely](docId\:fLX7cCmHhCf5QIV_3gGvF)
- [Performance and flicker](docId\:sgD1BsYNMvpjqHqp_qcdi)
- [How visitors are assigned to variations](docId\:sAtUYHXtt2H5eBGuGVFDv)
- [How targeting works](docId\:pUBcmS1M98xB8Mg8L99D_)
- [Revenue attribution](docId\:jpQKiTTVFyptseo8UEQOD)
- [Cookies and consent](docId:-HA6dgPmpYmb7x6UZQ_t2)
