PHPackages                             municipio/wp-plugin-tracking-gdpr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. municipio/wp-plugin-tracking-gdpr

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

municipio/wp-plugin-tracking-gdpr
=================================

WordPress plugin that adds more GDPR and tracking features to Municipio

2025.12.9(1mo ago)0521↑346.7%[1 issues](https://github.com/municipio-se/wp-plugin-tracking-gdpr/issues)[1 PRs](https://github.com/municipio-se/wp-plugin-tracking-gdpr/pulls)1GPL-2.0-or-laterPHP

Since Apr 10Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/municipio-se/wp-plugin-tracking-gdpr)[ Packagist](https://packagist.org/packages/municipio/wp-plugin-tracking-gdpr)[ RSS](/packages/municipio-wp-plugin-tracking-gdpr/feed)WikiDiscussions v25.x Synced today

READMEChangelogDependencies (9)Versions (14)Used By (1)

Whitespace Tracking &amp; GDPR
==============================

[](#whitespace-tracking--gdpr)

[Svensk version](README.sv.md)

Part of [Municipio LTS](https://github.com/municipio-se/municipio-lts). Whitespace Tracking &amp; GDPR adds a cookie consent dialog, Matomo tracking settings, service-based iframe handling, and Content Security Policy support for Municipio sites.

Requirements
------------

[](#requirements)

Whitespace Tracking &amp; GDPR is a WordPress plugin for Municipio LTS installations. The plugin requires PHP dependencies installed through Composer and Advanced Custom Fields PRO to be installed and active.

The runtime Composer dependencies are `imangazaliev/didom` and `wpackagist-plugin/advanced-custom-fields`. Frontend assets are built from TypeScript and CSS sources with pnpm, Vite, TypeScript, and Vanilla CookieConsent.

Features
--------

[](#features)

- **Cookie consent dialog** – Enqueues Vanilla CookieConsent with service, category, text, Matomo, and consent revision settings localized from WordPress.
- **Service registry** – Registers services such as YouTube, Vimeo, Mediaflow, Visma Recruit, and the plugin's own required service.
- **Embedded content handling** – Replaces supported content iframes with consent-aware `wstg-iframe` placeholders before the original iframe is loaded.
- **Iframe report** – Adds an admin report for published post, page, and Municipio iframe module embeds detected on the site.
- **Matomo settings** – Adds settings for Matomo URL, Tag Manager container ID, and site ID, with optional constants taking precedence over ACF values.
- **Consent revisions** – Tracks consent-impacting settings and lets administrators publish a new consent revision when visitors should be asked again, since v2025.12.7.
- **Content Security Policy** – Adds nonces to scripts and styles, registers service-driven CSP sources, and provides settings for additional allowed iframe hosts.

Compatibility and Fixes
-----------------------

[](#compatibility-and-fixes)

- **Advanced Custom Fields PRO** – The plugin stops loading its feature files and shows an admin notice when ACF PRO functions are missing.
- **Must-use plugins** – Translation loading supports both regular plugin and mu-plugin installation paths.
- **Mediaflow embeds** – Mediaflow wrapper replacement is handled through the service configuration, so the original preview wrapper can be replaced instead of only the nested iframe.
- **CSP settings** – Empty additional `frame-src` settings are treated as an empty list instead of causing fatal errors.
- **Consent storage** – Localized consent revision values are coerced to numbers before they are passed to the frontend.

Admin Tools and Migrations
--------------------------

[](#admin-tools-and-migrations)

- **Data sharing menu** – Adds a top-level Data sharing admin page with links to settings, consent revision publishing, and the iframe report.
- **Settings page** – Adds ACF options for service enablement, custom consent dialog strings, Matomo, CSP `frame-src` values, and allowing uncategorized embedded content.
- **Consent revisions** – Automatically bumps the revision when tracked consent settings change and provides a manual publish action from the admin page.
- **Migrations** – This plugin does not currently include repository migration files.

Embedded Content and Services
-----------------------------

[](#embedded-content-and-services)

The service registry drives consent categories, iframe parsing, optional replacement targets, cookies, and CSP sources. Supported iframe parsing currently covers YouTube, Vimeo, Mediaflow, and Visma Recruit, while unknown valid URLs can be allowed only when the administrator enables unrestricted embedded content.

Services can declare script matching rules, iframe parsing callbacks, iframe attributes, cookie metadata, and CSP directives. Necessary services are always enabled; other services are enabled through the Data sharing settings page.

Hook Reference
--------------

[](#hook-reference)

### Cookie Categories

[](#cookie-categories)

`apply_filters( 'wstg_get_cookie_categories', array $categories )` Filters the cookie category definitions used by the consent dialog and service settings.

### Scripts and Services

[](#scripts-and-services)

`apply_filters( 'wstg_script_category', string $category, array $attributes )`Filters the consent category assigned to an enqueued external script.

`apply_filters( 'wstg_script_service', string $service, array $attributes )`Filters the service key assigned to an enqueued external script.

`apply_filters( 'wstg_register_service', array $service, string $key )` Filters a service definition before it is stored in the registry.

`do_action( 'wstg_register_services' )` Runs when services should register themselves with `wstg_register_service()`.

`apply_filters( 'wstg_service_settings_sub_fields', array $sub_fields, string $service_key, array $service )`Filters the ACF settings sub fields generated for a registered service.

### Consent Dialog

[](#consent-dialog)

`apply_filters( 'wstg_trigger_cookie_dialog_menu_item', string $output, WP_Post $item, int $depth, stdClass $args )`Filters the menu item output for links that trigger the cookie dialog.

`do_action( 'wstg_consent_revision_bumped', int $revision, int $previous_revision )`Runs after the published consent revision has been bumped, since v2025.12.7.

### Embedded Content

[](#embedded-content)

`apply_filters( 'wstg_content_iframe_replacement', string $replacement_html, array $context )`Filters the replacement HTML used when content iframes are converted to consent-aware placeholders.

Development and Contribution
----------------------------

[](#development-and-contribution)

Read more about how to contribute in the [CONTRIBUTING.md file](CONTRIBUTING.md).

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance94

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Recently: every ~30 days

Total

12

Last Release

17d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3590?v=4)[Tom Clark](/maintainers/whitespace)[@Whitespace](https://github.com/Whitespace)

---

Top Contributors

[![jeanfredrik](https://avatars.githubusercontent.com/u/8242740?v=4)](https://github.com/jeanfredrik "jeanfredrik (74 commits)")[![RuslanaLogosha](https://avatars.githubusercontent.com/u/63247495?v=4)](https://github.com/RuslanaLogosha "RuslanaLogosha (5 commits)")[![degeer](https://avatars.githubusercontent.com/u/282174?v=4)](https://github.com/degeer "degeer (2 commits)")[![johanwestin](https://avatars.githubusercontent.com/u/411063?v=4)](https://github.com/johanwestin "johanwestin (1 commits)")

### Embed Badge

![Health badge](/badges/municipio-wp-plugin-tracking-gdpr/health.svg)

```
[![Health](https://phpackages.com/badges/municipio-wp-plugin-tracking-gdpr/health.svg)](https://phpackages.com/packages/municipio-wp-plugin-tracking-gdpr)
```

###  Alternatives

[wpzoom/instagram-widget-by-wpzoom

Simple and lightweight widget for WordPress to display your Instagram feed

241.4k](/packages/wpzoom-instagram-widget-by-wpzoom)[cshaptx4869/html2word

html to word

131.0k](/packages/cshaptx4869-html2word)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
