Conditional Section
All Categories Accepted Content
This content requires acceptance of Analytics, Marketing, and Personalization. Here you could place:
- Advanced analytics dashboards
- Marketing widgets and tools
- Personalized user experiences
- Third-party integrations that require multiple consent types
Enable all non-essential categories in your Cookie Preferences to view this content.
Only show when all non-essential categories are accepted
<!-- Show only when all non-essential categories are ACCEPT -->
<div class="conditional-content" id="all-accepted-content" style="display:none;">
<h3>All Non-Essential Accepted</h3>
<p>This appears only if Analytics, Marketing, and Personalization are all accepted.</p>
</div>
<div class="consent-required-message" id="all-accepted-message">
<p>Accept all non-essential categories in your <a href="javascript:void(0)" onclick="Osano.cm.showDrawer()">Cookie Preferences</a> to view this content.</p>
</div>
<script>
function updateAllAccepted(consent) {
if (!consent) return;
var content = document.getElementById('all-accepted-content');
var message = document.getElementById('all-accepted-message');
var categories = ['ANALYTICS','MARKETING','PERSONALIZATION'];
var allAccepted = true;
for (var i = 0; i < categories.length; i++) {
if (consent[categories[i]] !== 'ACCEPT') { allAccepted = false; break; }
}
if (allAccepted) {
content.style.display = 'block';
message.style.display = 'none';
} else {
content.style.display = 'none';
message.style.display = 'block';
}
}
document.addEventListener('DOMContentLoaded', function() {
if (typeof Osano !== 'undefined' && Osano.cm) {
Osano.cm.addEventListener('osano-cm-initialized', function(consent) { updateAllAccepted(consent); });
Osano.cm.addEventListener('osano-cm-consent-saved', function(consent) { updateAllAccepted(consent); });
}
});
</script>