[WordPress] 外掛分享: AG Data for PostHog

首頁外掛目錄 › AG Data for PostHog
WordPress 外掛 AG Data for PostHog 的封面圖片
全新外掛
安裝啟用
尚無評分
46 天前
最後更新
問題解決
WordPress 5.8+ PHP 7.4+ v1.5.3 上架:2026-06-17

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.5.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「AG Data for PostHog」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

AG Data for PostHog connects your WooCommerce store to PostHog — the open-source product analytics platform. Track the complete customer journey from first click to lifetime value, all within PostHog.
Why AG Data?
Most WooCommerce analytics plugins give you pageviews and basic events. AG Data gives you a full marketing attribution engine — first-touch/last-touch UTM tracking, ad click ID capture (Google, Meta, TikTok, Microsoft, LinkedIn), server-side first-party cookies that survive Safari ITP, and automatic LTV enrichment on every person profile.
Key Features
Server-Side Event Tracking

Order Completed, Order Refunded, Order Status Changed
Deduplication prevents double-counting
Blocking API calls ensure delivery before marking as tracked
Works with all payment gateways and checkout flows

Frontend Event Tracking

Product Viewed, Product List Viewed, Products Searched
Product Added / Removed (classic and block-based carts)
Cart Viewed, Checkout Started
Product Clicked, Coupon Applied / Removed, Payment Info Entered
Works without jQuery — block themes fully supported

Marketing Attribution Engine

Captures UTM parameters and ad click IDs (gclid, fbclid, ttclid, msclkid, li_fat_id)
Server-side first-party cookies bypass Safari ITP 24-hour restriction
First-touch and last-touch attribution persisted to every order
Days-to-conversion and session count tracking
Falls back to WooCommerce 8.5+ native attribution when cookies are unavailable
Attribution data included in all PostHog order events

Identity Stitching

Reads PostHog JS SDK cookie server-side for seamless funnel connection
Browser posthog.identify() for logged-in users
Server-side $identify with $anon_distinct_id merges anonymous and known profiles
PostHog funnels work end-to-end: Landing Page → Checkout Started → Order Completed

LTV Person Enrichment

total_orders, lifetime_value, avg_order_value, last_order_date updated on every purchase
first_order_date, acquisition_source, acquisition_medium, acquisition_campaign set once via $set_once
Build PostHog cohorts like “Customers with LTV > $500 acquired from Google Ads”

GDPR / Consent Management

Optional consent mode: starts PostHog opted-out with memory-only persistence
Exposes aphaOptIn() / aphaOptOut() JavaScript functions
Built-in support for CookieYes and Complianz consent management platforms

WooCommerce Compatibility

HPOS (High-Performance Order Storage) compatible
Cart and Checkout Blocks compatible
Classic and block checkout flows supported
Reverse proxy support for first-party tracking domains

Requirements

WordPress 5.8+
WooCommerce 7.0+
PHP 7.4+
A PostHog account (free tier available at posthog.com)

External services
This plugin connects to PostHog, a third-party product analytics service, to send your store’s analytics and e-commerce event data. This connection is required for the plugin to work — its entire purpose is to record analytics in PostHog. No data is sent until you enter a PostHog Project API key in the plugin settings.
What PostHog is used for:

Receiving server-side e-commerce events (Order Completed, Order Refunded, Order Status Changed).
Receiving frontend browsing events (Product Viewed, Cart Viewed, Checkout Started, and similar) via the PostHog JavaScript SDK, which is loaded on your site’s pages from your configured PostHog host.
Storing person profiles enriched with order/LTV data and marketing attribution data.

What data is sent, and when:

While a visitor browses your store, the PostHog JavaScript SDK captures pageviews and browsing events. This includes page URLs, referrer, UTM parameters, ad click IDs (gclid, fbclid, ttclid, msclkid, li_fat_id), and a PostHog-generated anonymous identifier.
When an order is placed, refunded, or changes status, the plugin sends order data from your server — order ID, totals, currency, line items, payment and shipping method, and billing/shipping country. For logged-in users, a WordPress-based identifier and the customer email may also be sent so anonymous and known profiles can be merged.
Requests are sent to the PostHog host you configure in the settings (PostHog US Cloud, PostHog EU Cloud, or your own self-hosted/proxy URL).

Service provider: PostHog Inc.
Terms of Service: https://posthog.com/terms
Privacy Policy: https://posthog.com/privacy

延伸相關外掛

文章
Filter
Apply Filters
Mastodon