Linux 软件免费装
Banner图

CAPI Suite: Meta Pixel, Pinterest & TikTok for WooCommerce

开发者 suhanduman
cenkcagdas
更新时间 2026年9月5日 04:28

标签

pinterest GTM meta pixel capi conversion api

下载

3.8.1 3.2.4 3.1.1 3.2.0 3.2.2 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.1.0 3.4.2 3.5.2 3.5.3 3.7.0 3.7.1 3.2.1 3.7.2 3.8.0 3.2.3 3.5.0 3.5.1 3.9.2 3.6.0 3.10.0 3.11.0

详情介绍:

Meta Pixel, Pinterest and TikTok, sent server-side, in one free plugin. A bundled Google Tag Manager template covers browser-side tracking. Sixteen events you switch on individually — PageView, ViewContent, ViewCategory, SelectItem, AddToCart, ViewCart, InitiateCheckout, AddShippingInfo, AddPaymentInfo, Purchase, Search, CompleteRegistration, AddToWishlist, Lead, Login and Comment — plus subscription renewals handled on their own terms. Classic and block-based checkout, HPOS compatible, each platform retried independently on failure. No cloud server to rent, no premium tier to unlock, no event limit. Your match quality climbs on its own after you update. Twenty identity parameters are assembled per event and normalised exactly the way Meta requires before they are hashed. The hashed keys are then remembered for up to 180 days behind a consent gate, so a returning visitor arrives already identified instead of anonymous. Nothing raw is ever written to disk: only salted SHA-256 hashes, which survive even a WordPress security-key rotation. Attribution survives the whole journey, not just the click. Eight click identifiers are captured and kept — fbclid, gclid, wbraid, gbraid, ttclid, pina_id, _epik and _ttp — written into first-party cookies client-side so a cached landing page never loses them, then persisted onto the order so a payment that completes days later is still credited to the campaign that earned it. Subscription renewals inherit the original order's identifiers instead of being credited to a fresh ad. Bots don't get counted as customers — and real shoppers on a VPN still are. Datacenter ranges are weighed against actual browser behaviour: mouse movement, scrolling, and whether a cart ever appears. A doubtful visit is held rather than thrown away, and if that visitor goes on to act like a real person, the whole funnel is released and reported retroactively. Purchases are never held back while any of this is decided. Apple iCloud Private Relay and corporate VPN egress ranges are recognised as real people, not as datacenters. Safari visitors stay attributable for 90 days, not 7. The cookie is written by the server, so Safari's seven-day cap on script-written cookies stops resetting the visitor every week. Your orders are counted once, not twice. The same event ID goes out browser-side and server-side within Meta's 48-hour deduplication window, so each platform matches them up instead of double-counting. A browser event that falls outside the window is suppressed rather than sent as a second conversion. You keep your analytics when a visitor declines cookies. The event still goes through for counting, with personal details stripped out first. Five consent platforms are recognised automatically — CookieYes, Cookiebot, Complianz, iubenda and Termly — and a filter covers anything else, including OneTrust, Usercentrics and hand-rolled banners. Built like infrastructure, not like a tracking snippet What this plugin stores To match server-side conversion events to the right person, the plugin stores SHA-256 hashes of contact details a visitor provides — email, phone, name and address components — against an opaque visitor identifier. Raw contact details are never written to disk; values are hashed before storage and the hash cannot be reversed.

安装:

Quick start (3 steps)
  1. Install and activate the plugin. WooCommerce must already be active.
  2. Open CAPI Suite → Main Settings and paste your Meta Pixel ID + Access Token. Add TikTok and/or Pinterest credentials if you use them. Empty fields for platforms you don't use are fine.
  3. (If you use GTM) Download the bundled gtm-template.json from the GTM Container ID box, import it into your GTM container in Merge mode, set the pixel-code constants to your real IDs, and publish.
Server-side events start flowing on the next page view. Send a test from Event Management → Test Modes to verify credentials before going live. Recommended GTM dedup configuration To prevent duplicate browser+server events:
  1. In Meta Events Manager → your Pixel → Settings → Event Setup, turn off "Track Events Automatically Without Code". This plugin handles all event sending.
  2. In your GTM container, pause or delete any auto-created tags starting with FB_.
The bundled GTM template ships GA4 + Meta tags pre-wired to the GA4 ecommerce dataLayer, plus TikTok tags that read from a CONST - TikTok Pixel Code variable and Pinterest tags that read from CONST - Pinterest Tag ID. The Pinterest tags are new, and one of them ships paused. Earlier releases said Pinterest tags had to be built by hand because the Community Template could fail to import inside a container export. That is no longer true — it was re-tested against a real container, both as a Merge into an existing workspace and as a fresh import, and the Pinterest template and all eight tags came through intact — so they are bundled now. Seven of them are on by default: PageVisit, ViewContent, ViewCategory, AddToCart, InitiateCheckout, AddPaymentInfo and Search. Three of those (ViewContent, InitiateCheckout, AddPaymentInfo) are events the Conversions API has no name for at all, so the browser tag is the only way Pinterest ever hears about them. Pinterest - Checkout is paused on purpose, and only you can finish the check. Pinterest matches a tag event to a Conversions API event on event_id, and the tag passes it — but that pairing has not been confirmed on a live Pinterest account, and this plugin's author has no Pinterest ad account to confirm it on. Left paused, your Pinterest sales keep being reported from the server only, exactly as they are today, and cannot be counted twice. To finish the check: set CONST - Pinterest Tag ID, enable the tag, publish, make one real sale, and open Pinterest Events Manager. One checkout event means the pairing works and you can leave it on. Two means it does not — pause it again. One more thing if you report subscriptions separately: Pinterest's tag takes a fixed event name, so that tag sends checkout for a renewal too, while the server side deliberately reports renewals as custom. If you cannot import the JSON template (locked container, workspace permissions) or want to set up GTM manually, the full step-by-step walkthrough ships with the plugin at wp-content/plugins/easy-meta-capi/docs/GTM-MANUAL-SETUP.txt. Verify Open CAPI Suite → Event Log after browsing your store. Successful dispatches show as "Success (Meta)" / "Success (TikTok)" / "Success (Pinterest)". The Dashboard widget shows queue health at a glance. If the log stays empty, a JS optimizer is probably deferring the plugin's inline scripts — see the cache-plugin FAQ. Detailed GTM setup, Google Ads Enhanced Conversions, and other platform tags live in docs/GTM-MANUAL-SETUP.txt. Consent Mode v2, Strict server-side consent, CMP auto-block, and WC Subscriptions are documented under Advanced Configuration below. Advanced Configuration Setup details for Consent Mode v2, the strict server-side consent mode (GDPR PII gating), CMP auto-block compatibility, and the WooCommerce Subscriptions integration. None of these are required for a basic CAPI setup — turn them on as your store needs them. Consent Mode v2 Setup (GDPR / EU Compliance) If you serve EU visitors, Google's browser tags stop writing cookies when consent is denied — typically losing 20–50% of measured event volume. Google Consent Mode v2 recovers part of it: when consent is denied, those tags switch to cookieless pings (anonymous beacons carrying event name, value, currency and timestamp but no client identifier), and Google models the conversions from them and shows them mixed with observed ones in your reports. How to enable. Popular CMP plugins (Cookiebot, CookieYes, Complianz, Iubenda, Termly, OneTrust) all have a native Consent Mode v2 toggle in their settings — find and enable it. The CMP then calls gtag('consent', 'default', {denied}) before GTM loads and gtag('consent', 'update', {granted}) after the visitor accepts. If you use a consent banner, import the container again. The container shipping with this release stops the Meta, TikTok and Pinterest tags from firing for visitors who declined: all 23 of them now wait for ad_storage and ad_user_data before they run. Download it again and import it as described above, choosing Merge and then Overwrite conflicting tags, triggers, and variables — overwrite is what replaces the tags you already have. Tags you built yourself, under names the template does not use, are left alone. The same import returns the template's ID constants (CONST - Meta Pixel ID, CONST - GA4 Measurement ID, CONST - TikTok Pixel Code, CONST - Pinterest Tag ID, CONST - Google Ads Conversion ID, CONST - Google Ads Purchase Label) to their placeholder text, so enter your own values again before you publish. CONST - Google Ads Conversion ID now takes the number on its own — 1234567890, not AW-1234567890 — because the Google Tag in the template adds the AW- prefix itself. The bundled GTM template includes a paused "Consent Defaults (Pre-CMP)" tag. Enable it only if your CMP doesn't set gtag('consent', 'default', ...) on its own (rare with modern CMPs). Strict server-side consent mode (PII gating for CAPI) Consent Mode v2 only controls browser tags. Server-side CAPI fires from PHP, never sees gtag('consent', ...) signals — so it transmits hashed PII regardless of cookie-banner choice. Fine outside the EU; a GDPR concern inside it. The Privacy & Consent (Server-side) section has a Strict server-side consent toggle (default OFF). When enabled and the visitor has denied marketing consent in your CMP, identifying PII (em, ph, fn, ln, address, fbp, fbc …) is stripped from the CAPI payload. The event still ships with event_id, value, currency, contents — Cookiebot, CookieYes, and Complianz cookies are read automatically; other CMPs supply state via the mcapi_marketing_consent_granted filter. Whose answer is used. A Purchase usually fires later than the checkout it belongs to — when the order reaches a paid status, which for a redirect gateway can be hours or days, in a cron tick or a gateway webhook where the shopper's browser is nowhere in sight. The shopper's consent answer is therefore recorded onto the order at checkout (both the classic and the block checkout) and read back from there at send time. That is what makes the toggle honour the customer's own choice rather than whoever's browser happened to trigger the send — a shop manager working in wp-admin, for instance, whose own banner choice used to decide it. An order placed before this version, or created without a checkout, has no recorded answer and is treated as "no signal", the same as a visitor with no CMP cookie; a renewal inherits the answer given at the original purchase. Why this matters alongside Consent Mode v2. Denied-consent browser pixels switch to cookieless pings — modeled, not observed. With Strict server-side consent ON, your server-side CAPI ships alongside that ping carrying the same event_id. Meta dedupes by event_id and now has an observed server signal feeding the same conversion record the cookieless ping created — cleaner Event Match Quality than browser-only or naïve "send everything" CAPI, and GDPR-defensible because no identifying data leaves your server. Default OFF preserves match quality for existing non-EU setups. Recommended ON once Consent Mode v2 is configured in your CMP. CMP Auto-Blocking and the Plugin's Inline Scripts CMPs with "auto-blocking" (Cookiebot, CookieYes, others) scan every <script> tag on load and convert anything they suspect of tracking to type="text/plain" until consent. The plugin's inline scripts only POST first-party events to your own REST endpoint — but a generic auto-blocker can't tell. To avoid a silent break, every plugin-rendered inline script ships with opt-out attributes for Cookiebot (data-cookieconsent="ignore"), CookieYes (data-cookieyes="cookieyes-necessary"), and Complianz (data-cmplz-no-cookielaw="1"). For other CMPs (OneTrust, Quantcast, in-house), append your own attribute via the mcapi_inline_script_attrs filter. WooCommerce Subscriptions Integration By default, every WooCommerce Subscriptions auto-renewal sends a fresh Purchase to Meta CAPI — credited to the original acquisition ad. Reported ROAS keeps climbing month after month from the same conversion, polluting optimization signals. The plugin auto-detects WooCommerce Subscriptions and exposes: Subscription Renewal Behavior (radio): As of 3.11.0 there is no separate "Tag" mode: it was byte-identical to Default with the customer-status checkbox below also ticked, so it was retired in favor of that existing combination. A store already saved on Tag keeps behaving exactly as before — it's migrated automatically on upgrade. Tell Meta whether each buyer is new or returning (checkbox, works on any WooCommerce store — not only subscription sellers): adds custom_data.customer_status (new_customer / returning_customer, or subscription_renewal on stores with WooCommerce Subscriptions active) to every Purchase so Meta Advantage+ can bid acquisition vs. retention differently. Guest checkouts fall back to billing-email lookup. X-Forwarded-For Hop Count (advanced proxy setups) Behind a trusted reverse proxy, the real-IP resolver walks X-Forwarded-For from the right, skipping entries that look like trusted infrastructure (a known proxy CIDR or a private/reserved address), and uses the first one that doesn't. This defeats the common attack of forging a leftmost entry, but it has a residual gap: if your proxy is configured to pass X-Forwarded-For through unmodified instead of appending the hop it actually witnessed (nginx's proxy_set_header X-Forwarded-For $http_x_forwarded_for instead of $proxy_add_x_forwarded_for is the classic case), every entry in the header is client-controlled — a visitor can append a filler value that merely resembles infrastructure (e.g. a private-looking address) and have an earlier, forged entry accepted as their IP instead. The plugin cannot detect this misconfiguration or infer your real proxy hop count on its own. If you know it — one hop for a single reverse proxy, more for a CDN plus a local proxy — set it with the mcapi_trusted_proxy_hops filter: add_filter( 'mcapi_trusted_proxy_hops', function() { return 1; } ); This bounds how many trailing hops the walk will ever treat as trusted-and-skippable; once that many are skipped it stops rather than continuing further left, so a crafted filler hop beyond the boundary can no longer push an attacker-chosen address through. Default is unbounded (today's behaviour) — leave it unset unless you are certain of your topology, since too low a value can make the walk stop before reaching a real client hop.

升级注意事项:

3.11.0
  • Fix: the bundled tag container turned anyone's purchase event into a sale. Its purchase trigger fired the Meta, TikTok, Google Ads and Google Analytics tags on any purchase event reaching the data layer, whoever pushed it — so a second plugin reporting on the order-received page produced conversions this plugin never sent and never logged, including for orders that were never paid for. The sale tags now fire only on an event this plugin alone pushes. Import the container template again to get this fix — a plugin update cannot change a container that lives in your Google Tag Manager account.
  • New: the Health tab tells you when something else on your site is reporting your sales. It watches your order confirmation page for purchase events that did not come from this plugin, and works whether or not you re-import the template.
  • New: the Event Log records the order's status at the moment each event was sent, and the time we actually sent it, alongside the conversion's own time.
  • Fix: the Event Log was ordered by the conversion's time rather than by when we sent it. A sale that fires late is deliberately back-dated, so it used to sort below rows logged before it and drop off the first page — which made a late sale look like a missing one.
  • New: export the Event Log to CSV, beside "Clear entire log". It exports everything matching the filter on screen, not just the fifty rows displayed, and streams in chunks so a large log does not exhaust memory.
  • Fix: the Contact Form 7 Lead event depended on your notification email being delivered. It listened for the hook that fires only when that email is actually sent, so on a site with broken or misconfigured mail — common, and usually invisible — every Lead was silently lost. It now fires when a submission passes validation, independent of mail delivery. Submissions that fail validation still do not count.
  • Fix: the Add to Wishlist event never fired at all. The handler sat behind a check that excludes admin-ajax requests, which is exactly how the wishlist plugin adds items.
  • New: browser-side tags for Pinterest in the bundled template — page visit, view content, view category, add to cart, begin checkout, add payment info and search. Pinterest was already covered server-side. The conversion tag ships switched off with instructions in the tag itself; enable it after checking that your first sale appears once, not twice, in Pinterest Events Manager.
  • New: Lead, Complete Registration, Add to Wishlist and Search tags for the platforms that treat them as standard events. These sent server-side only before.
  • Fix: subscription orders were counted twice. With separate Subscribe / Subscription Renewal events switched on, the browser half still reported them as a Purchase, so the platform could not pair the two halves. Both halves now agree.
  • Fix: two event identifiers were built from the current second alone, so two visitors doing the same thing within the same second were given the same identifier and the platform discarded one of them.
  • Fix: the watchdog asked the wrong clock. It looked at when a conversion happened rather than when we sent it, so a late-firing sale could fall outside its window and the watchdog would report a silence that was not there.
  • Fix: identity could cross between shoppers. A background request running one customer's order could attach a different visitor's cookies and identifiers to it. Several related paths were closed in the same pass.
  • Fix: delivery no longer stops for every platform when one platform's token expires, and an event that cannot be sent yet is retried rather than dropped.
  • Fix: the Login event did not identify who logged in. Three payload fields were accepted and meant something other than the platform understood them to mean.
  • Behaviour change — Pinterest event names. Seven events were being sent to Pinterest's API under names it does not accept, and are now sent as custom: view content, begin checkout, add payment info, add to wishlist, view cart, select item and subscription renewal. If you built a Pinterest campaign rule on view_content or initiate_checkout, it will stop matching — because it never matched anything. Pinterest's API accepts nine event names; those were not among them.
  • Behaviour change — the TikTok event name for a sale is now CompletePayment rather than Purchase, and Lead is sent as SubmitForm, matching the rosters in TikTok's own tag templates. Both the server side and the container changed together, so the two halves still pair — but the container half only reaches you if you re-import the template.
  • Behaviour change — phone numbers are normalised against a country table before hashing, so more of them match. A number previously sent in a shape the platform could not match may now match, which can move your reported match quality.
  • The Subscription Renewal Behavior setting has fewer choices: "Tag" collapsed into Default plus the separate Customer Status Tagging option. Nothing a store already reports changes.
3.10.0 A new Health tab shows what this plugin is doing and what to fix. If you use a consent banner, import the GTM container again — the Meta and TikTok tags were firing for visitors who declined. Choose Merge, then Overwrite conflicting, then re-enter your IDs. 3.9.2 Plainer wording on the settings screens. From 3.8.x you also get 3.9.0-3.9.1: hashed contact details kept up to 180 days, two first-party cookies, and a new privacy-policy section to review. An unanswered consent banner now counts as no consent, so match quality may read lower than before. 3.9.1 Fixes identity records being orphaned by a security-salt rotation (WordPress secret keys changed), pruning them safely now. By-IP column labels, GTM manual, and DSAR export labels are clearer. A one-time review request appears after your first successful Purchase. No action needed. 3.9.0 This release stores hashed contact details for up to 180 days to improve ad match quality, and sets two first-party cookies. Nothing is stored where marketing consent is refused — and minting a visitor identifier is now consent-gated too, so on a CMP-equipped store with consent unanswered, guests get NO external_id where 3.8.1 minted one unconditionally; you may see PageView match quality fall after updating. Review your privacy policy — the plugin now contributes its own section to the one WordPress generates. 3.8.1 Fixes an order paid after checkout reporting your server's own IP address as the customer's, which cost match quality on every purchase through a redirect payment gateway, and a related issue where updating an order's status yourself in wp-admin could attach your own browsing identity to that customer's purchase. Also sends more identifying detail with each event, all of it respecting existing consent settings. No action needed. 3.8.0 Critical: GTM template re-import required — TikTok double-counting otherwise. TikTok renamed its event names in 2025 (CompletePaymentPurchase, SubmitFormLead); the server-side CAPI call sends the new name, but the bundled GTM template's TikTok Purchase tag still sent the retired CompletePayment name until this release. TikTok deduplicates browser and server events by event name plus event_id — with the two sides disagreeing, dedup never matched and every TikTok purchase reported twice. Re-download gtm-template.json from Main Settings and re-import your GTM container in Merge mode (or edit the "TikTok - Purchase" tag's Event Name to Purchase manually — see docs/GTM-MANUAL-SETUP.txt). Behaviour change: Purchase now waits for a paid order status. Previously a Purchase was sent as soon as the order-received page loaded, even when payment had failed — so an abandoned payment at a redirect gateway still counted as a sale in Meta. It is now sent when the order reaches a paid status (by default whatever WooCommerce treats as paid, plus On hold), and if that happens later the event is sent then, even if the customer never returns. Stores with a custom order status should check Event Management → Send Purchase when the order is after updating; a one-time notice points you there. Also fixes a bug where one stale queued event could silently discard a whole batch of valid ones. Also corrects identity-field normalization, so hashed customer data actually matches, and keeps ad-click IDs attached to orders that are paid after checkout.

常见问题:

Does this plugin replace the Meta Pixel?

No, it works alongside it. The plugin sends server-side (CAPI) events, while GTM handles the browser-side Pixel. Both use the same event_id, so Meta merges them automatically without counting anything twice.

What is the difference between this and a GTM Server Container?

A GTM Server Container runs on Google Cloud and costs money every month. This plugin does the same job directly from your WordPress server — no extra infrastructure, no extra bill.

Does it work with page caching plugins (WP Rocket, LiteSpeed, etc.)?

Yes. PageView and ViewCategory events fire from JavaScript, so they work even on fully cached pages. Cart, checkout, and purchase pages are not cached by default.

What plugins are required?

WooCommerce. That's it. If another plugin on your site also manages Google Tag Manager or sends e-commerce events, turn its e-commerce tracking off so the same event is not counted twice. The Health tab tells you if it finds a pixel or measurement ID configured in two places at once.

Is there a pro version?

No. Everything is included.

My events aren't showing in Meta Events Manager.

Open the Event Log tab. If events appear there with "Success (Meta)", the plugin is sending — anything missing on Meta's end is a Pixel ID / Access Token mismatch. If the log is empty, your JS optimizer is likely deferring the inline scripts (see next answer) or your CMP auto-blocker converted them to type="text/plain" (see the CMP question below).

JS optimizer (LiteSpeed / WP Rocket / Autoptimize) — what do I configure?

Add these four IDs to your optimizer's "exclude from defer / combine" list: mcapi-pageview-init, mcapi-viewcontent-events, mcapi-viewcategory-events, mcapi-frontend-events. Cloudflare Rocket Loader is handled automatically via data-cfasync="false".

Does it work with a block-based theme (Twenty Twenty-Five etc.)?

Yes.

GTM Preview shows my browser tags firing, but the plugin's Event Log is empty.

Your CMP's auto-blocker is converting the plugin's inline scripts to type="text/plain". The plugin already carries opt-out attributes for Cookiebot, CookieYes, and Complianz; less common CMPs (OneTrust etc.) need the mcapi_inline_script_attrs filter — see CMP Auto-Blocking in Advanced Configuration.

I sell subscriptions — Meta is over-attributing renewals to old ads.

The plugin auto-detects WooCommerce Subscriptions and offers three behavior modes (Default / Skip / Subscribe + SubscriptionRenewal). Pick Skip or the dedicated-events mode to keep Purchase clean. See WooCommerce Subscriptions in Advanced Configuration.

EU traffic — does the plugin respect cookie-banner consent for CAPI?

Not by default — server-side CAPI fires from PHP, doesn't see your gtag('consent', ...) signals. The Privacy & Consent section has a Strict server-side consent mode toggle: when consent is denied, hashed PII is stripped from the CAPI payload but the event still ships with its event_id, so Meta's browser↔CAPI dedup keeps working without identifying data. Recommended ON for EU stores. See Strict server-side consent mode in Advanced Configuration.

Will the datacenter IP filter block my real VPN customers?

Rarely. Visitors with click IDs (fbclid / gclid / ttclid), Apple Private Relay IPs, logged-in customers, or prior-visit _fbp / _ga cookies all bypass the filter. Purchase events are never blocked. A brand-new VPN visitor with no cookies has their first PageView held; if they purchase, the full funnel is replayed so Meta sees the complete journey. Every blocked request is auditable in the Excluded Traffic tab.

How do I confirm TikTok is actually matching my customers' phone numbers?

TikTok's Events Manager can show you something this plugin cannot see from your server. Open Events Manager -> your Web Event Set -> Events, pick a recent Purchase (or any event the plugin sent with a customer phone on it), and look at the event's detail view: the parameters TikTok accepted are listed there, and phone appears under the user section. If phone is listed, matching is working; if the event arrived but no phone parameter is listed at all, the field is not reaching TikTok. The same view carries TikTok's own Event Match Quality score for the event set, which is the number that moves when phone matching starts working. If you use Test Events with a test event code, the same detail is visible there within a minute or two, without waiting for reporting to settle. (In 3.11.0 the plugin switched the phone and click-ID fields to the names TikTok's current Events API 2.0 reads — user.phone and user.ttclid — from the Events API 1.0 names it had been sending; if you were on an earlier version, this is the screen where the difference shows up.)

Why does the Excluded Traffic tab show IPs as 192.168.1.x?

GDPR-friendly auditing — the last octet is masked at record-time, so wp-admin and DB exports never reveal raw visitor IPs.

更新日志:

3.10.0 3.9.2 3.9.1 3.9.0 3.8.1 3.8.0