| 开发者 | gunjanjaswal |
|---|---|
| 更新时间 | 2026年8月7日 10:49 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
<script type="text/plain" data-cp-category="analytics" src="https://example.com/tag.js"></script>
When the visitor grants the "analytics" category, Konsentra swaps it for a real script tag and runs it. The same works for inline scripts and for the functional and marketing categories.
Developer hooks
A konsentra:updated event fires on document every time consent changes, so your own code can react:
document.addEventListener( 'konsentra:updated', function ( e ) { console.log( e.detail ); } );
konsentra folder to /wp-content/plugins/, or install it from the Plugins screen in your dashboard.No plugin can do that by itself. Konsentra gives you the consent banner, category controls, and script blocking you need, but compliance also depends on your privacy policy, how you handle data, and the services you use. Treat it as one important piece, not the whole picture.
It blocks any script you tag with type="text/plain" and a data-cp-category attribute. Add that markup to the scripts you want gated and they will only load once the visitor consents.
Only if you switch on consent logging, and even then it stores a hashed IP address, never the real one, along with a timestamp and the categories agreed to.
Yes. A .pot file is included in the languages folder and every string uses the konsentra text domain.
Add the [konsentra_settings] shortcode anywhere, for example in your footer or privacy page, and it renders a link that reopens the preferences panel.