Consent behaviour
Category: marketing, sometimes preferences for forms.
Common global: _learnq.
Requires separating forms from behavioural tracking.
Setup steps
Check that the newsletter form does not set tracking cookies before consent.
Start onsite tracking after marketing granted.
Document newsletter opt-in separately from cookie consent.
Example snippet
<script>
window.addEventListener('cookiepilot:consent', function (event) {
var consent = event.detail || {};
if (!consent.marketing || window.__klaviyoLoaded) return;
window.__klaviyoLoaded = true;
var script = document.createElement('script');
script.async = true;
script.src = 'https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=KLAVIYO_COMPANY_ID';
document.head.appendChild(script);
});
</script>Test checklist
The form works without breaking the page.
No behavioural identification before consent.
After Accept, Klaviyo starts only within the selected scope.
Related integrations
See the setups that most often appear together with this integration.
Ready to configure it?
Start CookiePilot, choose the right integration and verify that tags wait for user consent before they run.