Silent Consent for Microsoft Clarity
Silent, automatic consent layer for the official Microsoft Clarity plugin on internal/corporate WordPress websites
by Gioxx · github.com/gioxx/silent-consent-clarity · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/gioxx/silent-consent-clarity/releases/download/v2.1.2/silent-consent-clarity-2.1.2.zipDeclares an update source (gioxx/silent-consent-clarity), so updates arrive through the plugin's own updater.
Readme
Silent Consent for Microsoft Clarity
README disponibile anche in italiano
A WordPress plugin that adds a silent, automatic consent layer on top of the official Microsoft Clarity plugin. Designed for protected/corporate websites where cookie consent is not strictly required — it grants (or denies) Ad Storage and Analytics Storage consent automatically, without showing any banner and without touching your existing Clarity configuration.
Not affiliated with or endorsed by Microsoft. "Microsoft Clarity" is a trademark of Microsoft Corporation; this plugin only reads the configuration of the official Microsoft Clarity plugin.
Requirements
- WordPress 6.0 or higher
- PHP 7.4 or higher
- The official Microsoft Clarity plugin, installed and active with a configured Project ID
Installation
- Install and activate the official Microsoft Clarity plugin, and configure it with your Project ID.
- Copy the whole plugin folder to
wp-content/plugins/silent-consent-clarity/on your WordPress site. - Go to Plugins in the WordPress dashboard and activate "Silent Consent for Microsoft Clarity".
Language
The plugin interface is in English by default; if your WordPress is set to Italian (it_IT), the plugin automatically loads the included Italian translation (languages/silent-consent-clarity-it_IT.mo).
Configuration
Go to Settings → Clarity Consent and choose, for each of:
| Field | Description |
|---|---|
| Ad Storage Consent | Granted (Allow) or Denied (Deny). Passed to Clarity's consentv2 API. |
| Analytics Storage Consent | Granted (Allow) or Denied (Deny). Passed to Clarity's consentv2 API. |
How it works
- On every page load, the plugin detects an existing Microsoft Clarity Project ID (from the official plugin, from a previously saved value, or from a handful of known SEO-plugin options that may already carry one).
- If a Project ID is found, it enqueues a small front-end script that waits for
window.clarityto become available and then callsclarity('consentv2', { ad_Storage, analytics_Storage })with your configured values. - Nothing is injected in
wp-admin, and nothing is written back to the Microsoft Clarity plugin's own settings — this is a read-only, additive consent layer.
Updates
The plugin is compatible with Git Updater, so it can be kept up to date directly from the GitHub repository without going through WordPress.org.
Read the full README on GitHub →