Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.5 Update released for Drupal core (11.4.5)! Release: Drupal 10.6.15 Update released for Drupal core (10.6.15)! Release: Superfish Dropdown Menu 8.x-1.15 Minor update available for module superfish (8.x-1.15). Release: Leaflet 10.4.10 Minor update available for module leaflet (10.4.10). Release: Raven: Sentry Integration 7.5.1 Minor update available for module raven (7.5.1). Release: htmLawed 8.x-3.8 Minor update available for module htmlawed (8.x-3.8). Release: Raven: Sentry Integration 7.5.0 Minor update available for module raven (7.5.0). Module Revived: Media Library Form API Element 2.1.5 Module media_library_form_element updated after 10 months of inactivity (2.1.5). Release: Acquia Content Optimization 2.1.0-alpha1 First alpha version released for module conductor (2.1.0-alpha1). Usage Milestone: Manage display Module manage_display crossed 1,000 active installs.

This module automatically adds the Piwik PRO analytics tracking script to your Drupal site while ensuring it is secure by generating a unique nonce for Content Security Policy (CSP) on each request. It allows configuration of tracking settings, visibility, and cookie options to integrate seamlessly with your existing analytics setup.

Nonce Piwik Plugin integrates Piwik PRO analytics with Drupal's Nonce Generator module. It renders the Piwik PRO tracking bootstrap with a fresh Content Security Policy (CSP) nonce on every request.

Features

  • Adds the Piwik PRO tracking script automatically to the page.
  • Applies a CSP nonce to the inline bootstrap script and the dynamically loaded tracking script.
  • Configures the Piwik PRO container URL, site ID, data layer name, and cookie security options.
  • Controls tracking visibility by request path, user role, and content type.
  • Supports Drupal 10 and Drupal 11.

Post-Installation

Install and enable Nonce Generator and this module. Configure this module at /admin/config/security/nonce-piwik-plugin. Enter the Piwik PRO container URL and site ID, enable tracking, and review the visibility and cookie settings. Configure your site's CSP separately so it permits the configured Piwik PRO host in the directives required by your tracking setup.

Additional Requirements

  • Nonce Generator (required).
  • Drupal core's Path Alias module.
  • A Piwik PRO account and container.

Recommended modules/libraries

No other additional modules or libraries are required. A CSP configuration that allows the configured Piwik PRO endpoints is recommended.

Similar projects

Piwik PRO is the related general-purpose Drupal integration for Piwik PRO. Nonce Piwik Plugin is focused on nonce-aware tracking through the Nonce Generator plugin system and is intended for sites that need this CSP integration.

Supporting this Module

Please report bugs and feature requests in the Drupal.org issue queue.

Community Documentation

See the project README and the configuration help provided by the module. Contributions and documentation improvements are welcome.

Activity

Tracked releases
2
Tracked since
Jul 2026
Latest release
2 days ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.1 Stable Aug 6, 2026
1.x-dev Dev Jul 20, 2026