Description
Vlad Enterprises Cookie Consent is a lightweight, GDPR-minded cookie consent solution. It shows a consent banner on the first visit, gates analytics and marketing scripts until the visitor opts in, and automatically clears tracking cookies when consent is withdrawn.
Scripts are blocked before they run (not just hidden), so no analytics or marketing code executes without consent. A preferences modal lets visitors toggle categories at any time, and a shortcode or JavaScript API lets them reopen it later.
Key features
- Consent banner shown automatically on first visit.
- Preferences modal with per-category toggles (Necessary, Analytics, Marketing).
- Script gating by consent: mark scripts with
type="text/plain"anddata-categoryand they only run once allowed. - Auto-clear of common analytics/marketing cookies (
_ga,_gid,_gcl_au,_fbp,fr,hubspotutk, and more) when a category is declined. - Customizable banner position (5 positions), light/dark theme, cookie name and expiry.
[ccve_settings]shortcode to drop a “Cookie Settings” link anywhere.- JavaScript API:
CookieConsent.show(),.showPreferences(),.acceptAll(),.rejectAll(),.getPreferences(),.reset(). - Block and widget for the settings link.
- Built-in English and Romanian text, fully editable.
- Responsive design; runs early on
wp_headso gating applies before third-party code loads.
This plugin helps you collect and respect consent. It does not, by itself, make your site legally compliant — you are responsible for your cookie policy and for categorizing your own scripts correctly.
External services
This plugin does not connect to, or send any data to, any external service. It runs entirely on your own site.
Cookie and tag detection is performed locally in the visitor’s browser by inspecting the cookies and <script> tags already present on the page. Service names such as googletagmanager.com or connect.facebook.net appear in the plugin only as text patterns used to recognise tags that your own site has added — the plugin itself never makes requests to those domains.
Blocks
This plugin provides 1 block.
- Cookie Consent Settings Link
Installation
- Upload the plugin folder to
/wp-content/plugins/, or install the ZIP via Plugins Add New Upload Plugin. - Activate the plugin through the Plugins menu in WordPress.
- Go to Settings Cookie Consent to configure categories, position, theme, and text.
- Mark any analytics/marketing scripts with
type="text/plain"and adata-categoryattribute so they are gated by consent.
FAQ
-
How do I stop a script from running until consent is given?
-
Change its type to
text/plainand add a category, for example:<script type="text/plain" data-category="analytics">/* Google Analytics */</script>External scripts work the same way:
<script type="text/plain" data-category="marketing" src="https://example.com/pixel.js"></script>The script runs only after the visitor accepts that category.
-
How can visitors reopen the preferences later?
-
Use the shortcode
[ccve_settings text="Cookie Settings"]in any post, page, or widget, or callCookieConsent.showPreferences()from your own button. -
Yes. When a category is declined, the plugin removes cookies matching common analytics and marketing patterns.
-
Is it multilingual?
-
It ships with English and Romanian strings, and all banner/modal text is editable in the settings.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Vlad Enterprises Cookie Consent” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Vlad Enterprises Cookie Consent” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.2.1
- Display name changed to “Vlad Enterprises Cookie Consent” for a distinctive, directory-compliant name. The text domain remains
cookie-consent-ve(the current slug) until the new slug is reserved.
1.2.0
- Renamed the plugin display name to “Vlad Enterprises Cookie Consent”.
1.1.9
- Prefixed the option, settings group and shortcode (
ccve_settings) to avoid conflicts with other plugins. Existing settings are migrated automatically from the old option name. - Escaped the inline config output with
wp_json_encode()using HTML/JS-safe flags. - Documented that the plugin uses no external services.
1.1.8
- Removed the self-update-from-GitHub feature (overwriting plugin files from an external source is not permitted on WordPress.org; updates come through the directory).
- Removed the unused functions-helper.php example file, which contained a hardcoded plugin path. The plugin determines its own location via plugin_dir_url(FILE).
1.1.7
- Directory compliance: distinct Plugin URI and Author URI, WordPress.org username as author, explicit License URI.
- Added WordPress.org readme.
