Cookie Consent Content Control
Show or hide website content based on your visitors' cookie preferences automatically.
How It Works
1. Visitor sees your cookie banner
2. They accept or decline cookie categories
3. Website shows relevant content instantly
4. Content updates if they change preferences
Content Control Classes
Add these CSS classes to any website element:
Basic Controls
- cookieconsent-optin - Shows when ANY cookies accepted
- cookieconsent-optout - Shows when cookies declined
Category-Specific Controls
- cookieconsent-optin-preferences - Shows when preferences cookies accepted
- cookieconsent-optout-preferences - Shows when preferences cookies declined
- cookieconsent-optin-statistics - Shows when analytics cookies accepted
- cookieconsent-optout-statistics - Shows when analytics cookies declined
- cookieconsent-optin-marketing - Shows when marketing cookies accepted
- cookieconsent-optout-marketing - Shows when marketing cookies declined
Usage Examples
Basic Example:
<div class="cookieconsent-optin"> Personalized recommendations appear here </div>
<div class="cookieconsent-optout"> Generic content appears here </div>
Category Example:
<div class="cookieconsent-optin-marketing"> Social media widgets and ads </div>
<div class="cookieconsent-optout-marketing"> Basic contact information </div>
How to Add Classes
Website Builders (WordPress, Wix, etc.):
1. Edit content block
2. Find "Advanced" or "CSS Class" setting
3. Add the class name
4. Save
HTML/CMS:
Add class to any div:
<div class="cookieconsent-optin">Content</div>
Best Practices
- Always provide alternative content for declined cookies
- Explain what's hidden and how to enable it
- Test with different cookie settings
- Don't break site functionality when cookies are declined
Troubleshooting
Content not changing? Check:
- Class names spelled correctly
- Cookie widget installed properly
- Content in correct HTML containers