=== Truss Consent Manager – GDPR Cookie Consent Manager for WordPress ===
Contributors: gutenplugins
Tags: consent manager, cookie consent, cookie banner, consent management, GDPR, CMP, cookie manager, Google Consent Mode, Google Consent Mode v2, WooCommerce, privacy compliance
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.5.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Consent Manager plugin for WordPress and WooCommerce with cookie consent banner, script blocking, consent management, Google Consent Mode v2, and privacy compliance tools.

== Description ==

Truss Consent Manager is a powerful Consent Manager plugin for WordPress and WooCommerce. It helps website owners manage cookie consent, privacy preferences, script blocking, cookie settings, and Google Consent Mode v2 from a single dashboard.

Unlike basic cookie banner plugins, Truss Consent Manager functions as a lightweight Consent Management Platform (CMP). The built-in Script Scanner analyses real frontend output to detect tracking technologies, while the Script Blocking Engine prevents approved trackers from loading until visitor consent is granted.

Whether you need a Cookie Consent Manager for GDPR Cookie Consent, privacy compliance, cookie preferences, or Google Consent Mode v2, Truss Consent Manager provides the tools needed to manage visitor consent without complex configuration.

== Why Choose Truss Consent Manager ==

Truss Consent Manager helps WordPress and WooCommerce site owners manage cookie consent and privacy compliance without complex setup.

* Consent Manager dashboard for managing visitor preferences
* Cookie Consent Manager with multiple banner layouts
* Automatic tracking script detection
* Script blocking before consent is granted
* Google Consent Mode v2 support
* WooCommerce compatibility
* Granular consent categories
* Privacy-first architecture
* Consent Management Platform (CMP) functionality
* Cookie settings and cookie preference controls

== Consent Manager Features ==

* Three banner layouts: Cookie Bar, Card, and Floating Box
* Accept All, Decline All, and granular consent controls
* Analytics, Marketing, Functional, and Necessary categories
* Script Scanner for detecting tracking technologies
* Script Blocking Engine for consent-based loading
* Smart category visibility based on detected services
* Google Consent Mode v2 integration
* Developer API for custom integrations
* Privacy compliance focused architecture

Detects popular tracking technologies including:

* Google Analytics
* Google Tag Manager
* Meta Pixel
* TikTok Pixel
* Microsoft Clarity
* Hotjar
* Matomo

== Cookie Consent Manager ==

The built-in Cookie Consent Manager helps visitors understand and control how cookies and tracking technologies are used on your website.

Visitors can:

* Accept all cookies
* Decline non-essential cookies
* Configure individual consent categories
* Update cookie preferences at any time
* Review cookie settings when required

== WooCommerce Consent Manager ==

Truss Consent Manager is designed for WooCommerce stores and helps manage consent for analytics, marketing, and functional services while maintaining a smooth shopping experience.

== Google Consent Mode v2 ==

When enabled, the plugin injects the required consent signals before Google services load.

Signal Mapping:

* Analytics consent → analytics_storage
* Marketing consent → ad_storage
* Marketing consent → ad_user_data
* Marketing consent → ad_personalization
* Functional consent → functionality_storage
* Functional consent → personalization_storage

Compatible with Google Analytics 4, Google Ads, and Google Tag Manager.

== Privacy First ==

Consent preferences are stored locally in a first-party browser cookie. No consent data is transmitted to external servers by this plugin. The Consent Manager is designed around privacy-by-default principles.

== External Services ==

Google Consent Mode / Google Tag Manager / Google Analytics

When Google Consent Mode v2 is enabled, the plugin communicates consent preferences to Google's gtag() and dataLayer APIs.

What is sent:

* Consent grant and denial signals

When it is sent:

* When a visitor accepts, declines, or saves preferences
* On future visits to restore consent preferences

Google Privacy Policy:
https://policies.google.com/privacy

Google Terms:
https://policies.google.com/terms

== Installation ==

1. Upload the plugin to /wp-content/plugins/
2. Activate the plugin through the WordPress Plugins screen
3. Open Consent Manager from the WordPress dashboard
4. Configure your cookie banner and consent preferences
5. Run the Script Scanner
6. Review detected services
7. Enable Script Blocking if required

== Frequently Asked Questions ==

= Why use Truss Consent Manager? =

Truss Consent Manager combines cookie consent, script blocking, granular consent management, Google Consent Mode v2 support, and privacy compliance features in a lightweight plugin built specifically for WordPress and WooCommerce.

= Does this plugin make my site GDPR compliant? =

The plugin provides the technical infrastructure required for consent management, including a consent banner, script blocking, cookie preference controls, and Google Consent Mode v2 integration. Legal compliance depends on your configuration, privacy policy, and local regulations.

= How does the Script Scanner work? =

The scanner uses a two-phase approach. First, it captures the real HTML output of your site's frontend using output buffering on wp_head and wp_footer and stores it in a transient. When you run a scan from the admin area, it analyses this captured output against a library of known tracker signatures. This approach is more accurate than remote HTTP fetching because it captures inline scripts, dynamically injected scripts, and WordPress-registered script handles.

= Does the Script Blocking Engine break my site? =

Script blocking can potentially interfere with checkout flows, forms, or analytics implementations if scripts are miscategorised. Always test on a staging site first. Essential WordPress core and WooCommerce functionality is never blocked.

= How does the Script Blocking Engine handle trackers? =

The engine runs locally without cloud dependencies. Detected tracking scripts can be rewritten to type="text/plain" to prevent execution before consent. Once consent is granted, those scripts are reactivated automatically.

= How does Google Consent Mode v2 integrate with GTM? =

The plugin injects the required gtag consent default call before Google Tag Manager loads. GTM reads the consent state from the dataLayer and updates automatically when visitor preferences change.

= Where is consent data stored? =

Consent preferences are stored in a first-party browser cookie named wpcm_consent. No consent data is sent to external servers by this plugin.

Example:

{"necessary":true,"analytics":true,"marketing":false,"functional":false}

= Does this Consent Manager work with WooCommerce? =

Yes. The plugin is designed to work with WooCommerce and WordPress websites.

== Developer API ==

For custom scripts or integrations, manually register scripts using:

wpcm_register_script( $handle, $category )

Categories include:

* analytics
* marketing
* functional

== Screenshots ==

1. Consent Manager settings page
2. Cookie banner configuration
3. Google Consent Mode v2 settings
4. Script Scanner results
5. Cookie Bar layout
6. Card layout
7. Floating Box layout

== Changelog ==

= 1.5.0 =
* Added Google Consent Mode v2 integration
* Added consent signal mapping
* Added integration framework

= 1.2.0 =
* Added Script Blocking Engine
* Added blocking_enabled setting
* Added wpcm_register_script() developer API
* Added server-side consent cookie checks

= 1.1.0 =
* Added Script Scanner
* Added tracker detection system
* Added scanner administration interface
* Added Smart Toggle Visibility

= 1.0.0 =
* Initial release
* Cookie consent banner
* Multiple layout options
* Consent preferences
* Privacy policy integration

== Upgrade Notice ==

= 1.5.0 =

Adds Google Consent Mode v2 support and improved consent handling.
