| 开发者 | varly |
|---|---|
| 更新时间 | 2026年12月4日 17:42 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
varly_print_snippet (filter, bool): add the snippet to this page or not. Use it to leave out other pages than the checkout.varly_exclude_current_user (filter, bool): leave out the current user's visits. The snippet still loads, so Varly's visual editor and previews keep working. This needs pages not to be cached for logged-in users.VARLY_APP_URL and VARLY_CDN_URL (constants in wp-config.php): other Varly addresses, for example for a test setup.window.Varly offers track(name, props), ids() and consent(granted). See the Varly help.Yes. Create one at varly.ai and add your site. Then click Connect to Varly in Settings → Varly.
Yes. On any WordPress site, the plugin adds the snippet, so you get heatmaps, recordings, surveys and A/B tests. The order features switch on by themselves when WooCommerce is active.
Varly only lists sites whose domains include your WordPress address, so a site can't be connected to the wrong place. In Varly, add the domain under Settings → Tracking & privacy → Domains, then click Check again on the Connect page.
Check three things. Tracking is on in Varly: open your site there and look under Install. Your site has a cookie banner: Varly waits until a visitor accepts cookies, so without a banner nobody can accept and nothing is measured (the next question names the exceptions). And you accepted cookies yourself: open your site in a private window, accept cookies in the banner, and a few minutes later click Check status again under Settings → Varly. The line Data in Varly on that page tells you which of these it is.
No. Varly waits for consent in your cookie banner. Until then it sets no cookies and sends nothing, unless you turned on one of the optional settings in Varly for visitors without consent (privacy mode, tests before consent, anonymous heatmaps); see Cookie consent. When Varly does nothing at all before consent on your site, the snippet is marked so that cookie banners with automatic blocking, such as Cookiebot and Complianz, don't block it; blocking it would only cause flicker. If your Varly settings let it do something before consent (no consent needed, or an option for visitors without consent), the banner keeps blocking it as before.
Cookiebot, CookieScript, OneTrust, Usercentrics and TrustArc directly, and every banner that sends Google Consent Mode. For banners that are WordPress plugins, this plugin reads the visitor's stored choice itself and passes it on to Varly. A returning visitor is then recognized right away, without waiting for the banner's script, and Varly's cookies are removed when a visitor declines:
varly in Borlabs Cookie; visitors who accept that service are measured.The plugin tells WP Rocket, LiteSpeed Cache, W3 Total Cache, Autoptimize, SiteGround Speed Optimizer, Perfmatters, FlyingPress, Hummingbird, WP-Optimize, Breeze, NitroPack, WP Fastest Cache, Jetpack Boost and Cloudflare Rocket Loader to leave the snippet alone: it adds attributes to the script tag that these plugins read (data-cfasync="false", data-no-optimize, data-no-defer, data-noptimize, data-no-minify, data-no-delay-js, nitro-exclude, nowprocket, data-jetpack-boost="ignore") and adds Varly to their exclusion lists through their own filters. Clear the cache once after connecting. If you use another speed plugin, exclude scripts from cdn.varly.ai from options like Delay JavaScript and Combine JavaScript.
The snippet loads at the top of the page and prevents flicker itself: until a test's change is made, it hides only the parts of the page that test changes, for a moment at most, never the whole page. A separate script that hides the whole page would slow every page down.
From version 1.4.0 the plugin adds the snippet to the cart and the checkout too, whatever their address, so you can run A/B tests, recordings, heatmaps and surveys there. You decide what runs on these pages, and you are responsible for it. Varly is careful there by default. What visitors type in your site's fields, such as their name, address or email, is never recorded or sent, on any page. On the checkout, session recordings also hide all text on the page, such as a name or address shown back to the visitor. Payment fields from your payment provider sit in a frame of that provider, and Varly never records frames. Forms with card fields are not measured at all. To leave the checkout out, go to Settings → Varly and tick "Leave the checkout out". The snippet is then not added to the checkout at all. Your cart and the order confirmation page keep it, and orders still reach Varly from your server. On the checkout, a small script of the plugin hands the visit over with the order either way; see the next question. Is your payment form on your own checkout page, for example with card fields of your payment provider? Then PCI DSS, the card industry's security standard, asks you to keep a list of every script on that page and check it for changes. Add the Varly snippet to that list, or leave the checkout out.
No. With a cookie banner the plugin can read (Complianz, CookieYes, Borlabs Cookie or one that works through the WP Consent API), an order is linked to the visit only when the visitor's stored choice is yes, also when they change their choice on the checkout itself. The one exception is privacy mode, a setting of your site in Varly (off by default). With privacy mode, visitors who haven't accepted cookies take part in your A/B tests anonymously, with a random ID in the browser's local storage and no cookie. On the checkout, the plugin puts that ID in the checkout form itself, so the order counts in the test. It sets no cookie for this, and never does it when the browser sends Do Not Track or Global Privacy Control. Varly only keeps the ID when privacy mode is on. See Cookie consent.
An order is sent once it is paid (status Processing or Completed, or another status your shop counts as paid). Orders that are not paid yet, such as Pending payment or On hold, are not sent on their own; they only appear, with their status, in the daily order list. WordPress runs background tasks when someone visits your site, so an order can take a minute or two. Settings → Varly shows the last order sent or the last error, and each order that failed has a note from Varly.
Safari deletes cookies and storage written by scripts after 7 days. A visitor who comes back later is a new visitor to Varly and can see the other version of a running test. From version 1.3.0 your own site can keep a copy of Varly's visitor ID in a cookie it sets itself, _varly_keep (one year). Cookies set by a site's own server are not deleted after 7 days.
It is off until you turn it on: in Varly, open Settings → Tracking & privacy and tick "Recognize returning Safari visitors for longer than 7 days". It sets one more cookie after consent, so add _varly_keep to your cookie list first. The copy is only made for visitors who accepted cookies, and removed when they decline. The Varly snippet asks your site for it only in Safari and only while the copy is missing, at an address of its own (/wp-json/varly/v1/keep) that is never served from a page cache. Settings → Varly in WordPress shows whether it is on.
It is a choice in Varly, under Settings → A/B testing, and off by default. Normally Varly loads beside your page and hides the parts a test changes once it is there. On a slow connection it can arrive after the page is drawn, and the visitor sees the original for a moment. With this choice, the plugin puts a short list and a small script in the page head: the parts that a running test changes stay invisible from the first moment, only on the pages where the test runs, until Varly has loaded. At most 1.5 seconds, also when Varly never loads. The rest of the page shows as fast as before. When the list changes, the plugin empties your page cache.
It removes its settings, its cached status, its background tasks and the Varly fields it saved with orders, and Varly stops the order API key. Your orders stay as they are. Your data in Varly stays in your Varly account. Deactivating the plugin also removes its background tasks.
_varly_keep).