Overview
Klaviyo in a store usually combines newsletter forms, user identification and marketing automation. The preset helps separate newsletter opt-in from onsite tracking and starts tracking only after the right consent.
marketing, sometimes preferences for forms.
_learnq.
Requires separating forms from behavioural tracking.
Consent behaviour
The form works without breaking the page.
No behavioural identification before consent.
After Accept, Klaviyo starts only within the selected scope.
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
Example snippet
<!-- Keep the newsletter form working. Load onsite tracking only after marketing consent. -->
<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.
Setup steps
- 1Check that the newsletter form does not set tracking cookies before consent.
- 2Start onsite tracking after marketing granted.
- 3Document newsletter opt-in separately from cookie consent.
Test checklist
- The form works without breaking the page.
- No behavioural identification before consent.
- After Accept, Klaviyo starts only within the selected scope.
FAQ
Is this legal advice?
No. It is an implementation guide. For unusual data flows, confirm the setup with your legal or privacy team.
Does CookiePilot block every script automatically?
CookiePilot supports autoblocking and Consent Mode. Trackers hardcoded before the CMP still need to be moved behind the stub or into GTM Consent Initialization.
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.