Articles on: Frequently Asked Questions (FAQ)

How to block Klaviyo from collecting information?

In order to block the tracking from Klaviyo so that no information is being collected if a customer has opted out of the Marketing cookie group, you would need to add an additional script in your main theme file. Here are the steps that you would need to follow:

Open Shopify Admin.
Click on Online Store link in the left menubar.
Click on the Action dropdown button and select Edit Code from there.
A new page will open with a list of files on the left side of the screen. Open the theme.liquid file.
Find the string </head> in there.
When you do, you can copy and add the following snippet before </head>:

function checkGDPRKlaviyo() {
      if (window.isenseGDPR !== undefined && window.isenseGDPR.Cookies.get('cookieconsent_preferences_disabled') !== undefined) {
        let cookie = window.isenseGDPR.Cookies.get('cookieconsent_preferences_disabled');
        if (cookie.indexOf('marketing') == -1) {
          document.cookie = "__kla_off=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
        } else {
          document.cookie = "__kla_off=true"; 
      } else {
        setTimeout(function() {
        }, 500);


    window.addEventListener('click', function (e) {
      if( && ( == 'cc-btn cc-btn-accept-all' || == 'cc-btn cc-allow' || == 'cc-btn cc-btn-accept-selected')){

Click on the "Save" button.

For additional reference on how the script works, feel free to check the documentation for Klaviyo here - About Cookies in Klaviyo

How the script works? - We are setting the Klaviyo cookie __kla_off to true, which should stop Klaviyo from tracking onsite activity data, if the customer has opted out of the Marketing cookie group through our app.

Once you’ve successfully added the script, you need to add the Klaviyo cookie __kla_id into our app by navigating to Cookie Bar tab > Cookies Management section.

If you are a paid plan user, you can add the cookie from the Cookie Information Panel, as shown below:

For free users, you may add the cookie directly to the Cookie Categories, as shown below:

If you have any questions, don't hesitate to contact our support team at: or from the Chat button at the bottom right corner of your browser.

Updated on: 19/12/2023

Was this article helpful?

Share your feedback


Thank you!