Linux 软件免费装
Banner图

Pressed Hog – Analytics for PostHog

开发者 seainthetrees
更新时间 2026年10月20日 17:29
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce analytics cookie consent feature flags posthog

下载

0.3.2

详情介绍:

Pressed Hog installs PostHog product analytics on your WordPress site — no code required. Works with PostHog Cloud (US or EU) and self-hosted PostHog instances. Features Consent integration for developers In "external" consent mode, tracking stays off until either the configured cookie equals the configured value, or your consent plugin calls: window.pressedHog.grantConsent(); or window.pressedHog.denyConsent(); Hooks PostHog is a registered trademark of PostHog, Inc. This plugin is an independent integration and is not affiliated with or endorsed by PostHog, Inc.

安装:

  1. Upload the plugin to /wp-content/plugins/pressed-hog-analytics-for-posthog, or install it via the Plugins screen.
  2. Activate it — you'll be taken straight to the setup wizard.
  3. Follow the wizard: pick your PostHog region, paste your project API key (starts with phc_), choose tracking and consent options, and send a test event.
You can re-run the wizard any time from the "Setup wizard" link on the Plugins screen, or manage everything on Settings → Pressed Hog.

屏幕截图:

  • Setup wizard: choose what to track.
  • Setup wizard: choose how cookie consent is handled.
  • The settings page.
  • In-dashboard analytics with traffic chart, top pages, referrers, and devices.
  • The built-in cookie consent banner.

常见问题:

Where do I find my project API key?

In PostHog, open Settings → Project. The key starts with phc_ and is safe to expose publicly.

Does this work with self-hosted PostHog?

Yes — choose "Self-hosted / custom" as the host and enter your instance URL.

Does the plugin send any data to PostHog on its own?

Only what you enable. The tracking snippet runs in visitors' browsers; the only server-side request is feature flag evaluation (when you use the shortcode or helpers), sent to your configured PostHog host.

Does the reverse proxy work on any host?

It needs pretty permalinks enabled (Settings → Permalinks). Every tracked event then passes through your server as a lightweight relay to PostHog — fine for most sites, but consider a CDN-level proxy for very high-traffic sites.

How do the QR codes track scans?

Each trackable link appends standard UTM parameters (source, medium, campaign) plus a unique phg_qr id to your destination URL. When someone scans the code and lands on your site, posthog-js captures those parameters on the $pageview event, so you can break scans down by campaign — or by individual QR code — in PostHog. The QR image itself is generated in the visitor's/your browser; the URL is never sent to an external QR service.

Where are my links stored, and can I export them?

They're saved in your WordPress database (the pressed_hog_links option) and listed on the QR Codes page. Use "Download sheet (CSV)" to export every link — label, destination, full tracked URL, UTM values, tracking id, and created date — as a spreadsheet you can open in Excel or Google Sheets.

Is my personal API key safe?

It is stored in its own non-autoloaded WordPress option. Public tracking requests load a separate settings option and do not retrieve the credential. It is only ever used server-side (never printed on the front end). Create it with the read-only Query scope so it can't modify anything.

更新日志:

0.3.2 0.3.1 0.3.0 0.2.1 0.2.0 0.1.0