| 开发者 | trackdolphinhq |
|---|---|
| 更新时间 | 2026年10月13日 23:12 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-json/trackdolphin/v1/collect); the shop relays the event to Trackdolphin. If the shop REST route is unavailable, browser events can fall back to your project collector directly.wp-cron.php every few minutes): purchases are delivered by the WooCommerce Action Scheduler in the background.td_ to trackdolphin_ on first load. Credentials, settings and counters are carried over automatically; delivery jobs that were already scheduled are still processed; the old REST route td/v1 keeps answering for cached pages.Yes. Browser events and server-side orders require an explicit analytics or marketing grant before leaving the shop, including the visitor’s IP address and user agent. No event is sent before a decision or after full rejection, regardless of the service mode. The script reads the WP Consent API (opt-in), Google Consent Mode, Cookiebot, Usercentrics, IAB TCF 2 and Trackdolphin's banner. Defaults never count as decisions. Purchases use the consent snapshot saved at checkout; missing or ineligible snapshots are not transmitted. The same local check applies to queued purchases after an update. Marketing identifiers require marketing consent. After updating, purge any external full-page/CDN cache so visitors receive the new script. The plugin invalidates supported WordPress page caches once; cached HTML outside WordPress must be purged by the site operator.
Yes. The plugin declares compatibility with custom_order_tables and only reads and writes order data through the WC_Order object.
Yes. Consent and identifiers are captured through woocommerce_store_api_checkout_update_order_meta for the block checkout and through woocommerce_checkout_create_order for the classic checkout. The plugin declares compatibility with cart_checkout_blocks.
Nothing. Until the shop is linked with an activation code, no script is added to your pages, no cookie is set and no data is sent anywhere. Paid orders that arrive while the plugin is unlinked are counted in the status line ("Unreported purchases") so you can see what was missed.
_td_vid (first-party visitor id, 365 days, only with marketing consent) and _td_consent (the consent decision the script saw, 180 days, only after a decision). Click ids (gclid, gbraid, wbraid, _fbc) are stored as cookies only with marketing consent. LinkedIn's click ID (li_fat_id) is stored in _td_li_fat_id for 30 days, also only with marketing consent.
Trackdolphin stores the events of your project on its own infrastructure. Nothing about the visitor is stored in the WooCommerce database except the consent snapshot and identifiers on the order (_td_* order meta) and a small encrypted delivery queue in the options table while a purchase is waiting to be sent.
Purchases, cancellations and refunds are always delivered to the project the shop is currently linked to, also after the project or collector address has changed. For orders anonymized by WooCommerce's privacy tools, pending and later events are still sent, but without personal data (no identifiers, hashes, address, IP address or user agent; only amount, currency, items and the country code).
Uninstalling revokes the installation key at Trackdolphin, removes the credentials, settings, counters and the delivery queue. Orders keep their _td_* meta so that a later reinstall does not report the same purchase twice.
/en/docs/…); the old addresses keep working as permanent redirects.origin: migrated and source: placeholder; invalid entries in the service map are dropped one by one instead of rejecting the record. A retry carries a service the visitor has meanwhile switched off. _td_consent stays purpose-based; the purchase reads only the denials from the banner cookie. No new cookie; nothing leaves the shop before the visitor decides.denied, even when another service of the same purpose is allowed; the dataLayer event td_consent_update carries the service map as td_services; if the cookie gets too large, the denials are kept and only the "yes" entries are dropped. Embeds marked with data-td-cm-src stay unloaded behind a placeholder until the visitor loads them. The runtime still makes no network request of its own; nothing leaves the shop before the visitor decides./consent.js REST route. Clear page caches after updating so cached pages load the local script.wp_set_consent() fires wp_listen_for_consent_change per call), so the first event still said "marketing denied" and the catch-up was rejected by the collector with 403 consent_required. The script now reads the consent state once, after all categories have been set.trackdolphin_ instead of td_: options, transients, the delivery hook (trackdolphin_deliver_event), the daily heartbeat, admin actions, nonces, the settings group and the REST namespace (trackdolphin/v1). A one-time migration copies existing options and transients to the new names and removes the old ones; delivery jobs scheduled under the old hook are still processed; the old REST namespace td/v1 stays registered as an alias for pages served from a cache. Cookies (_td_vid, _td_consent), order meta (_td_*) and signature headers (X-Td-*) are unchanged: they are the contract with the collector, not WordPress namespace. Constants TRACKDOLPHIN_VERSION and TRACKDOLPHIN_PATH replace TD_VERSION and TD_PATH (kept as aliases).Trackdolphin_Updates, pre_set_site_transient_update_plugins). Plugins in the WordPress.org directory receive their updates from the directory; a custom updater is not permitted there.wp_print_inline_script_tag() and wp_print_script_tag(); every file guards against direct access; inputs are unslashed and sanitized; parse_url() replaced by wp_parse_url(); no error_log() in production code (the reason now lands in the status line). Plugin Check reports no errors and no warnings for the shipped files./wp-json/trackdolphin/v1/consent.js, fetched from the Trackdolphin service and cached for an hour), so the browser still sees only the shop domain and a new banner release needs no plugin update.403 consent_required), the status line says so, with the last time it happened and what helps.gclid/gbraid/wbraid (also from Google's _gcl_aw cookie), _fbc/_fbp, GA client id; fallback is the entry URL of WooCommerce's order attribution.custom_order_tables) and the block checkout (cart_checkout_blocks).source: cmp or source: default); the collector answers 202 or 403 consent_required.country_code in the purchase payload so the server can apply the per-country rule.consent_required from the server is counted once per order, shown in the status line and never retried.source: default.window.wp_consent_type; it now also reads window.wp_fallback_consent_type._td_consent; the server-side snapshot reads it as a second source.default was treated like an update. A preset never unlocks events or cookies, only a decision does.consent.source and consent.cmp.