ConsentSprout – Cookie Consent Manager
ConsentSprout displays a configurable consent banner and preference panel. Visitors can accept all optional categories, reject them, or choose functional, analytics, and marketing categories separately. Necessary storage is always enabled. Consent choices are stored in the visitor’s browser using lo
ConsentSprout displays a configurable consent banner and preference panel. Visitors can accept all optional categories, reject them, or choose functional, analytics, and marketing categories separately. Necessary storage is always enabled.
Consent choices are stored in the visitor’s browser using localStorage. ConsentSprout does not send consent records to a remote server and does not set cookies or collect personal data. If browser storage is blocked, a choice remains effective only for the current page view.
This plugin is a technical consent tool. It does not guarantee legal compliance. Site owners are responsible for configuring the plugin and integrations for their own legal and operational requirements. ConsentSprout cannot automatically detect or block every script from themes, plugins, tag managers, or custom code; those integrations must be configured by the site owner.
No external services, remote assets, analytics, or telemetry are used.
Integration
For an external script, change src to data-src , set type="text/plain" , and specify a category. Example:
<script type="text/plain" data-consentsprout-category="analytics" data-src="https://example.com/analytics.js"></script>
For inline code, use the same type and category attributes and put the code in the element. Only do this for scripts you control. Do not put executable third-party code into unsanitized admin settings.
Categories are functional , analytics , and marketing . necessary is always true. This mechanism only applies to scripts explicitly marked for ConsentSprout. It cannot prevent a separate plugin or theme from loading the same script by another route.
JavaScript API
The API is available as window.ConsentSprout after the plugin script loads:
- ConsentSprout.getConsent() returns the category object or null before a choice is saved.
- ConsentSprout.hasConsent('analytics') returns a boolean.
- ConsentSprout.openPreferences() opens the preference panel.
- ConsentSprout.withdraw() withdraws optional consent by saving all optional categories as false.
- ConsentSprout.onChange(function(categories) {}) registers a consent-change callback.
- document emits consentsprout:consent-ready and consentsprout:consent-changed CustomEvents with consent data in event.detail .
Use [consentsprout_preferences] in a post or page to display a link-style button that opens preferences.
Privacy
ConsentSprout stores the category selection, policy version, choice time, and expiry time in localStorage on the visitor’s device. It does not transmit this data to the site or a third party. The storage key is consentsprout_consent . Clearing browser storage removes the saved choice. The site owner can change the consent lifetime in settings. Necessary storage supports remembering that choice; optional categories remain off until selected.
Screenshots & previews.
- 01Upload the consentsprout folder to /wp-content/plugins/ or install the ZIP through Plugins > Add New > Upload Plugin.
- 02Activate ConsentSprout in the Plugins screen.
- 03Open Settings > ConsentSprout to configure the banner, categories, privacy policy link, policy version, duration, and position.
- 04Mark each optional script for its consent category using the integration pattern below.
Frequently asked questions.
Does this make my site legally compliant?
No. It provides consent controls, but cannot determine your legal obligations or discover every script on your site. Configure integrations and policy language with your own requirements in mind.
Will it block every tracking script automatically?
No. Only scripts explicitly marked with the documented data attributes are gated. Configure the scripts and integrations used by your site.
Is any feature paid or time limited?
No. All plugin features are free, with no account, trial, quota, premium unlock, or license key.
Where is consent stored?
In the visitor’s browser localStorage. No consent records are sent to a remote service.