Klaviyo and EEA consent requirements

Have more questions? Submit a request

Klaviyo is a powerful marketing automation platform designed for e-commerce businesses. It helps companies personalize and optimize their marketing efforts through data-driven insights. By integrating with various e-commerce platforms and leveraging customer data, Klaviyo enables businesses to create targeted email campaigns, SMS marketing, and automated workflows. This results in enhanced customer engagement, improved retention, and increased revenue. Klaviyo's robust analytics and segmentation capabilities allow for precise audience targeting. Additionally, it connects with Google Ads to create audiences and remarketing lists, allowing businesses to reach potential customers with tailored ads based on their interactions and behaviors.

 

Google Ads now requires that you sent details about the consent of users for the new Google Consent Mode types ad_user_data and ad_personalization when adding users from Klaviyo to Google ads audiences. More information about this can be found in this help article: https://help.klaviyo.com/hc/en-us/articles/6353315757211#h_01HQ3YJPXNF7AP7VSWBMH2BA4T

We have written a helper script that will update the signals for registered users. You can find the script below on this page. To check whether this working you will see the signals being added to the user profile in Klaviyo when consent is given for the advertising category.

 

Here is the helper script, you need to make sure that the klaviyo script runs on the website before this script fires.

 


  <script>
function handleConsentChange(e) {
    var consent = e.detail || {};
    var advertisingConsent = consent.advertising || null; // Get advertising consent from event detail

    //console.log("Advertising consent:", advertisingConsent);

    // Function to record consent in Klaviyo
    function recordConsentInKlaviyo(status = "denied") {
        if (typeof klaviyo !== "undefined" && klaviyo.isIdentified()) {
            klaviyo.push(['identify', {
                'ad_personalization': status,
                'ad_user_data': status,
            }]);
        }
    }

    if (advertisingConsent === true) {
        //console.log("Klaviyo: Push Ads enabled");
        recordConsentInKlaviyo('granted'); // Update Klaviyo consent to 'granted'
    } else if (advertisingConsent === false || advertisingConsent === null) {
        //console.log("Klaviyo: Push Ads Disabled");
        recordConsentInKlaviyo('denied'); // Update Klaviyo consent to 'denied'
    } else {
        console.error("Unexpected advertising consent value:", advertisingConsent);
    }
}

// Add event listeners for cf_consent and cf_consent_loaded
window.addEventListener("cf_consent", handleConsentChange);
window.addEventListener("cf_consent_loaded", handleConsentChange);
</script>

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share