| 开发者 |
suhanduman
cenkcagdas |
|---|---|
| 更新时间 | 2026年9月5日 04:28 |
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
_fbp (90 days).mcapi_identity_retention_days.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.FB_.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):
Purchase. Existing setups unchanged.Subscribe for sign-ups + a SubscriptionRenewal custom event for renewals. Purchase stays clean, advertisers using LTV-bidding can opt into both.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.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.
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.
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.
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.
No. Everything is included.
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).
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".
Yes.
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.
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.
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.
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.
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.)
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.
_fbp are issued by the server, surviving full-page caching and Safari's 7-day cookie cap. Hashed identity is published to window.dataLayer for Advanced Matching, consent-gated. Event Log shows match keys per event; WordPress's exporter/eraser handle this data.external_id. Expect PageView match quality to fall; that is the intended trade, not a bug._fbp cookie.mcapi_identity_extra_fields filter for gender/date of birth. Consent-denial stripping now covers these plus TikTok's click and pixel identifiers.event_source_url. Event Log Refresh button works again.ttclid; renewals inherit them too. Revisiting order-received could double-count a sale — fixed.X-Forwarded-For trusts the rightmost hop, not a forged leftmost one (new mcapi_trusted_proxy_hops filter). Contact Form 7's Lead event uses the shared hashing pipeline, avoiding a collision with a bad digest. event_id fallback now uses a UUID, and multibyte User-Agent values aren't truncated mid-character.Purchase/Lead.