| 开发者 | layersync |
|---|---|
| 更新时间 | 2026年5月18日 03:45 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
event_id so browser and server halves are deduplicated automatically.
What's Included
Nine ad platforms, one plugin — Meta CAPI, GA4 MP, Google Ads Enhanced Conversions, TikTok Events API, Pinterest CAPI, Snapchat CAPI, LinkedIn CAPI, Reddit CAPI, X CAPI. Browser pixels + server-side CAPI for all of them, with automatic deduplication.
WooCommerce funnel coverage — view item, add to cart, view cart, begin checkout, add payment info, purchase, refund. HPOS-compatible. Triple-fallback purchase capture (payment_complete + checkout_order_processed + woocommerce_thankyou) so custom checkouts still fire.
Lead-form auto-detect — Contact Form 7, WPForms, Ninja Forms, Formidable Forms, and WooCommerce checkout forms.
Browser-side recovery engine — save-first localStorage queue, priority-aware overflow (purchases never dropped), cross-tab serialization, exponential backoff with jitter, multi-day retention (up to 30 days for purchases), sendBeacon on page exit.
Privacy & compliance — per-event consent snapshot, default-denied mode, CMP integration via window.LayerSync.setConsent(), SHA-256 PII hashing, IP anonymization, GDPR / UK ICO / CCPA-aware (Meta Limited Data Use, Do-Not-Sell drop mode).
Operational visibility (via the LayerSync hub) — real-time event status, per-platform delivery success rates, anomaly detection, Slack/PagerDuty/email digest alerts (paid plans).
Free vs Paid Plans
Free includes browser pixels for all 9 platforms, server-side CAPI to one platform of your choice, 1 site, 1 team seat, 10,000 events/month, WooCommerce + lead-form auto-tracking, event quality scoring, real-time event log.
Paid plans add: server-side CAPI to all 9 platforms, higher event quotas, multiple sites, team seats, Slack/PagerDuty alerts, anomaly detection, audience builder, ROI dashboard, user journeys, customer profiles, automatic conversion recovery, custom event definitions, white-label (enterprise), custom ingest domain (enterprise).
Compare Plans
For Developers
LayerSync exposes a JavaScript API, a same-origin REST endpoint, and WordPress hooks for custom event tracking.
JavaScript API:
window.LayerSync.track('lead', {email: 'user@example.com', value: 25.00, currency: 'USD'});
window.LayerSync.setConsent({ad_storage: 'granted', ad_user_data: 'granted'});
REST endpoint (same-origin, nonce-protected, survives ad-blockers and corporate firewalls):
POST /wp-json/layersync/v1/events
WordPress filter hooks: layersync_event_payload, layersync_event_before_enqueue, layersync_event_after_delivery, layersync_consent.
Full API documentation: layersynchub.com/docs.
Compatibility
Works alongside Cookiebot, CookieYes, OneTrust, Borlabs Cookie, Complianz, and any CMP that supports a JS consent callback. Compatible with WP Rocket, LiteSpeed Cache, W3 Total Cache, Cloudflare, and other major caching/CDN solutions.
Getting Started
When browser-side pixels miss conversions (due to iOS 14+, ad blockers, or cookie restrictions), ad platforms optimize on incomplete data and your cost-per-acquisition rises. LayerSync fixes this by sending conversion events server-to-server to every connected platform via their respective Conversions API. Browser and server events are deduplicated automatically using a shared event_id, so platforms see more of your real conversions without double-counting. More complete data means better optimization and improved Return on Ad Spend.
event_id. User data (email, phone, name, address) is SHA-256 hashed and sent as Advanced Matching parameters for maximum Event Match Quality (EMQ). No Google Tag Manager server container required.
Server-side tracking sends conversion events directly from your server to ad platforms — instead of relying only on browser JavaScript pixels. This matters because:
Yes. This plugin connects WordPress to the LayerSync SaaS, which performs the actual server-to-server dispatch to each ad platform. The LayerSync account is what configures which platforms are enabled, stores your API credentials encrypted, and runs the queue + recovery worker. A free plan is available.
Nine: Meta (Facebook & Instagram), Google Ads, Google Analytics 4, TikTok, Pinterest, Snapchat, LinkedIn, Reddit, and X (Twitter). All nine are server-side, all nine are available on paid plans. The free plan supports browser pixels for all 9 and server-side CAPI for one of your choice.
Yes. LayerSync automatically tracks the full WooCommerce funnel: product view → add to cart → view cart → begin checkout → add payment info → purchase → refund. Order metadata (value, SKU, currency, quantity, category) is captured automatically. HPOS-compatible. Triple-fallback purchase hook (payment_complete + checkout_processed + thankyou) ensures no transaction is missed.
The current release covers WooCommerce and any custom integration via the JavaScript / REST APIs. Support for additional ecommerce platforms is on the roadmap.
No. The browser tracking script loads asynchronously (non-blocking), events are batched server-side, the same-origin REST proxy is lightweight, and the plugin uses indexed database tables. Compatible with WP Rocket, LiteSpeed Cache, W3 Total Cache, Cloudflare, and other caching/CDN solutions. The browser-side recovery queue uses localStorage with strict size limits — no measurable impact on page load.
Yes. LayerSync is fully compatible with WooCommerce HPOS. WC order data is read via the standard wc_get_order() API which abstracts over both storage modes.
Yes. The plugin captures per-event consent state and respects it during retries. There's an admin toggle for "default to denied until consent" suitable for EU/UK traffic. CMPs integrate via window.LayerSync.setConsent({ad_storage: 'granted', ad_user_data: 'granted', ad_personalization: 'granted'}). PII (email, phone, name, address) is SHA-256 hashed server-side before any platform handoff. IP anonymization is supported.
Yes — via the setConsent() API. Pass the v2 fields (ad_user_data, ad_personalization) and LayerSync forwards them to Google's gtag in the correct shape.
Yes. The Privacy tab has an LDU toggle. When enabled, every Meta server event ships with data_processing_options: ['LDU'] so California-resident traffic is CCPA-compliant.
Browser pixels keep firing directly to ad platforms (they're independent of the LayerSync hub). Server-side events queue in your WordPress database for up to 30 days for critical events (purchases, refunds), 7 days for high-value funnel events (add-to-cart, begin-checkout, lead), and shorter windows for behavioral events. When LayerSync recovers, the queue drains automatically without intervention.
Yes. Use the JavaScript API:
window.LayerSync.track('button_click', {button_name: 'Download PDF', value: 0});
Or the REST endpoint from your own PHP code:
POST /wp-json/layersync/v1/events
Custom event definitions per site (with per-platform name mapping) are available on paid plans.
Yes. Every report in the LayerSync dashboard has a CSV export. You can also pull data programmatically via the REST API on paid plans.
Yes. The plugin loads each platform's pixel SDK directly from the platform CDN with hashed Advanced Matching set at init time. You can disable any other Meta/Google/TikTok pixel plugins. Don't run two plugins that load the same pixel — both will fire, doubling your conversion counts.
Yes. The free WordPress plugin can be installed on unlimited sites. Each site connects to one LayerSync account. Agencies running multiple client stores use the Growth or Enterprise tiers, which include white-label branding, custom ingest domain, and multi-site management from a single dashboard.
Free includes: browser pixels for all 9 platforms, server-side CAPI to one platform of your choice, 1 site, 1 team seat, 10K events/month, WooCommerce + lead-form auto-tracking, event quality scoring, real-time event log. Paid plans add: server-side CAPI to all 9 platforms, higher event quotas, multiple sites, team seats, Slack/PagerDuty alerts, anomaly detection, audience builder, ROI dashboard, user journeys, customer profiles, automatic conversion recovery, custom event definitions, white-label (enterprise), custom ingest domain (enterprise). Compare Plans
_layersync_purchase_pixel_rendered order meta on first render and silently skips on subsequent visits, mirroring the existing server-side _layersync_purchase_sent guard.view_content event in addition to page_view, so Meta and TikTok have an explicit top-of-funnel signal for cold-start audience optimization.tel:, sms:, mailto:, WhatsApp (wa.me, api.whatsapp.com), and Messenger links fire a contact event mapped to Meta Contact and TikTok Contact. Captures intent signals from off-site CTAs without any merchant setup.firePixelEvent now passes content_name and content_type through to Meta and TikTok for non-product events so Pixel Helper and attribution dashboards label them meaningfully.purchase / refund events (those flow only through the WooCommerce server hook now).<script> to ship through wp_add_inline_script against registered handles, in line with the WordPress Plugin Directory's enqueue-API guideline.register_setting() sanitize callbacks with named static methods so static-analysis tools can resolve them.=, +, -, @ characters to prevent spreadsheet formula injection when an admin opens the file.Requires Plugins: woocommerce; bumped Requires at least to 6.5.window.LayerSync.setConsent({...}), IP anonymization, and SHA-256 PII hashing before any platform handoff.