| 开发者 | mrdarkside |
|---|---|
| 更新时间 | 2026年8月25日 22:37 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
pageView automatically for fraud prevention and basic analytics.
Full Tracking (optional): Tracks all mandatory e-commerce events per the Barion Pixel documentation:
advanced-pixel-for-barion folder to /wp-content/plugins/The Base Pixel (pageView) works without WooCommerce. Full event tracking (contentView, addToCart, initiateCheckout, purchase, setEncryptedEmail) requires WooCommerce.
No. The Barion Payment Gateway is a payment processor only — it doesn't implement Barion Pixel event tracking. Both plugins coexist perfectly. If both have a Pixel ID configured, Advanced Pixel for Barion detects that bp.js is already loaded and skips re-loading it.
CookieYes, Complianz, Cookiebot and the legacy Cookie Law Info banner are read directly, with no extra plugin. Every other banner works through the WP Consent API plugin, including Real Cookie Banner, GDPR Cookie Compliance (Moove) and Cookie Notice by dFactory. Turn on Debug Mode to see which one the plugin found.
Base Pixel loads bp.js and fires pageView on every page. This is used by Barion for fraud prevention and basic analytics. Full Tracking adds e-commerce events (product views, add to cart, checkout, purchase) that enable marketing analytics. Full Tracking is also a condition of Barion's discounted Advanced package — see the question about fees below.
Yes. Just uncheck "Enable Full Pixel Tracking" in the settings. The base pixel will still load and fire pageView events.
Barion has no page that lists your events. The Barion admin gives you your Pixel ID (Barion Wallet > Merchant Management > Details), but it does not show incoming events.
You check the events in your browser instead. Enable Debug Mode in Settings > Barion Pixel, then open the browser console (F12). Every event the plugin sends appears with a [Barion Pixel] prefix.
Barion's own bp.js script also writes to the same console, and its message tells you your approval state:
Testing message — your pixel works, but Barion has not authorised it yet. Barion receives only the type of the event, not user data. Every new implementation starts here.Sending message — Barion reviewed and approved your implementation. Barion now receives the full data.Not on its own. Barion offers a discounted "Advanced" package for the Barion Smart Gateway, and a complete Full Pixel implementation with consent management is one of its conditions. Two things are important. First, you have to request the package from Barion — it is not applied automatically when you install a pixel. Second, Barion examines your implementation before granting it, and commercial conditions apply as well, for example your average cart size and your card mix. For the current conditions, see the Barion Smart Gateway page.
The addToCart event uses client-side JavaScript instead of PHP sessions, so it works correctly with all page caching setups (WP Super Cache, W3 Total Cache, LiteSpeed, WordPress.com hosting, etc.). Other events fire on dynamic pages that are not cached.
grantConsent was never sent on a site without the separate WP Consent API plugin, so Barion refused to approve the Full Pixel integration. Consent detection tried three sources in turn and stopped at the first match, and the last of them attached no listener at all. CookieYes, Complianz, Cookiebot and the legacy Cookie Law Info banner are now read directly, with no extra plugin.grantConsent was also missed for a returning visitor who had already answered the banner, and on any site whose consent manager finished loading after the page did. The plugin now keeps looking for a consent manager for ten seconds after the page loads, rather than checking once.is_product(), a function that only exists while WooCommerce is loaded, so the page died with Call to undefined function is_product(). The WooCommerce event hooks are now registered only when WooCommerce is active. The base pixel still loads without WooCommerce, as documented. This dates back to 1.0.0.initiateCheckout and setEncryptedEmail never fired on the WooCommerce Checkout block, which has been the default for new stores since WooCommerce 8.3. The plugin only listened for the classic checkout's PHP hooks and its #billing_email field, and the block has neither. It now reads the Cart and Checkout blocks' data store. Classic checkout behaviour is unchanged.addToCart never fired on shop or category pages, on any store. The events script was only loaded on pages that already had an event queued, which no archive page does, so the add-to-cart listeners were never present where customers actually add to cart. This affected classic stores too, and dates back to 1.0.1.addToCart now also works with the block product buttons used by the Product Collection block. These run on the Interactivity API and fire neither the classic jQuery event nor the block data store, so cart contents are now read from the WooCommerce Store API.wp-content/languages/plugins unless a plugin registers its own directory, and the plugin never did. It now registers languages/ on init.Requires PHP raised from 7.2 to 7.4. WordPress 7.0 dropped support for PHP 7.2 and 7.3, so 7.2 was no longer a version the plugin could run on.setEncryptedEmail was firing multiple times on a single checkout page load (the change + blur pair plus the updated_checkout rebind caused duplicates).x@y) with error 12 (Format of e-mail address or hash is invalid in setEncryptedEmail). The email is now validated against the HTML5 spec for valid email addresses before being sent; pre-computed SHA-1 hashes are also accepted, matching the Barion Pixel API reference.+ in the local part (e.g. alice+tag@example.com), or with TLDs longer than four letters (e.g. .museum, .online), were rejected by bp.js with Format of e-mail address or hash is invalid. The plugin now SHA-1 hashes the email client-side (via the Web Crypto API) before passing it to bp.js, which bypasses bp.js's restrictive internal email regex. The Barion Pixel API explicitly supports pre-computed SHA-1 hashes.bp('identity', 'setEncryptedEmail', ...) (previously 'identify').blur handler, idempotent rebinding via a data attribute).wp_print_footer_scripts had already run.setEncryptedEmail now also fires when the customer enters their email on the checkout page (and on checkout load for logged-in users), as required by the Barion Pixel API reference.DOMContentLoaded, so it can see globals defined by consent plugins that load later in the page.