Drupal is a registered trademark of Dries Buytaert
cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). editoria11y 2.2.22 Minor update available for module editoria11y (2.2.22). ai 1.2.13 Minor update available for module ai (1.2.13). ai 1.3.2 Minor update available for module ai (1.3.2). moderated_content_bulk_publish 2.0.51 Minor update available for module moderated_content_bulk_publish (2.0.51). moderated_content_bulk_publish 2.0.50 Minor update available for module moderated_content_bulk_publish (2.0.50). editoria11y 2.2.21 Minor update available for module editoria11y (2.2.21). eca 3.1.0 Minor update available for module eca (3.1.0). sophron 3.1.1 Minor update available for module sophron (3.1.1). ai 1.3.1 Minor update available for module ai (1.3.1). seven 2.0.0-beta6 New beta version released for theme seven (2.0.0-beta6). seven 1.0.1-beta1 First beta version released for theme seven (1.0.1-beta1). bamboo_twig 6.0.7 Minor update available for module bamboo_twig (6.0.7). ebt_core 1.4.38 Minor update available for module ebt_core (1.4.38). ept_core 1.4.24 Minor update available for module ept_core (1.4.24). block_exclude_pages 2.2.2 Minor update available for module block_exclude_pages (2.2.2). dxpr_theme_helper 3.1.1 Minor update available for module dxpr_theme_helper (3.1.1). dxpr_theme_helper 3.1.0 Minor update available for module dxpr_theme_helper (3.1.0).

This module is part of the Analyze module ecosystem and included in DXPR CMS.

Your Analytics Data Belongs Next to Your Content, Not in Another Tab

You're editing a page. How many visitors did it get this month? Is traffic growing or declining? Which countries and devices are your audience using? Right now you'd switch to PostHog, find the URL, set the date range, and read a dashboard. With this module, that data is right there on the Analyze tab — every entity, every metric, zero context switching.

You need Analyze PostHog if

  • You use PostHog for product analytics (cloud or self-hosted) and want to see traffic data per page inside Drupal
  • Your content team needs pageview, visitor, and session counts without leaving the CMS
  • You want to compare this period to the previous one and spot trends at a glance — not just static numbers
  • You need to break down traffic by referrer, country, device, or browser for targeted content decisions

How It Works

Install the module, store your PostHog API key using the Key module, enter your PostHog host and project ID in the settings, and you're connected. Every content entity with a URL path gets analytics data in its Analyze tab — pulled live from PostHog's HogQL API. A sitewide report surfaces traffic patterns across your entire site.

What You Get

  • Pageviews, visitors, sessions, and bounce rate per page

    Every content entity shows its PostHog performance in the Analyze tab — with change vs the previous period (e.g., "397 pageviews (+12.3%)") so you see trends, not just numbers.

  • Dimension breakdowns

    Drill into the full report to see where your traffic comes from and how it behaves:

    • Referrer — which sites and campaigns send visitors to this page
    • Country — geographic distribution of your audience
    • Device — desktop vs mobile vs tablet breakdown
    • Browser — Chrome, Firefox, Safari, and others
    • Page — top pages across your site (sitewide report)
  • Sitewide and entity-level reports

    The sitewide report at /admin/reports/posthog shows KPIs and dimension tables for your entire site. Entity reports show the same data scoped to a single page. Both include previous period comparison.

  • Filters for focused analysis

    Filter reports by country, status (new, up, down, lost), and text search to zero in on the data that matters. Filters work on both sitewide and entity reports.

  • Session replay link

    Jump directly from the Analyze tab to PostHog's session replay — pre-filtered to the current page — and watch real users interact with your content.

  • Conversion attribution (coming soon)

    Connect page visits to business outcomes. Define conversion goals (signups, purchases, form submissions) and see which pages drive the most conversions — using PostHog's session-based attribution.

  • Drush commands

    Query analytics for any URL, view sitewide reports, check connection status, and clear the cache from the command line — useful for scripted reporting, CI pipelines, and DevOps workflows.

Getting Started

  1. Install with Composer: composer require drupal/analyze_posthog
  2. Enable the module and the Key module
  3. Create a PostHog personal API key with read access
  4. Store the API key at /admin/config/system/keys (Key module) and configure your PostHog host and project ID at /admin/config/analyze/posthog
  5. Enable the analyzer per content type at /admin/config/content/analyze-settings

Prefer a turnkey demo site?

Spin up DXPR CMS — Drupal pre-configured with DXPR Builder, DXPR Theme, the full Analyze suite including PostHog integration, and security best practices out of the box.

Get DXPR CMS »

Additional requirements

This module requires:

  • Analyze module (>=1.1.0)
  • Key module for secure API key storage
  • A PostHog account (cloud or self-hosted) with a personal API key

Activity

Total releases
1
First release
Apr 2026
Latest release
1 day ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.0-beta1 Pre-release Apr 6, 2026