Where does all the data get stored in the Cookie Consent widget?

Since there are no settings in the cookie consent widget, I don’t know where all the data is stored or how it manages permissions.

2 Likes

Hi @salaar_yasar, I need to inform you that our Cookie Consent widget serves a function of notification and it actually doesn’t add, enable or disable cookies. So Cookie Consent widget is for purely informative purposes, and the responsibility for the use of cookies (or any other analytics) rests entirely with you as the site’s owner.

We also have an article that explains it in more detail - Cookie Consent doesn’t block cookies.

Let me know if you have any other questions :slight_smile:

2 Likes

Okay thank you for telling me, but your team also has made a cookie consent widget that says if i accept or decline cookies?

2 Likes

Hey @salaar_yasar, I’ll gladly continue discussion with you!

Yes, you are right, the users can click accept or decline. However, this was also created only for the information purposes, so your visitors could see that you are using cookies :raised_hands:

Please let me know if this explains things :pray:

2 Likes

Okay thanks for letting me understand👍

3 Likes

@salaar_yasar you’re always welcome! :dizzy:

2 Likes

This does not make a lot of sense to me. If the user declines cookies, the site owner is going to have to have some way to know so that they can be sure not to add cookie to the user’s browser cookie cache.

2 Likes

@Hugh is correct, this widget is faulty. It needs to be revisited as it is misleading, nonfunctional, and dangerous.

There should not be a “Dismiss” button if it does nothing. For example, site owners using Google Analytics will be in contravention of EU cookie regulations and GDPR, but they will think that they are fine because they put up a banner. That’s not how it works at all, and they may face big fines for breaking EU law.

For site owners reading this, this cookie banner is NOT compliant with EU regulations. You will need to either design and code your own cookie banner, or use a Cookie Management Platform (CMP).

3 Likes

Hi there, @Hugh :wave:

Thank you so much for the feedback!

While our widget doesn’t process cookies, I am happy to say that it’s possible to decline cookies, using a Google Analytics code and JS script to meet new cookie policy requirements.

Here are the scripts :slightly_smiling_face:

Please add this part of the code to your website <head>:

<script async src="https://www.googletagmanager.com/gtag/js?id=G-ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-ID');
gtag('consent', 'default', {
  'ad_storage': 'denied',
  'analytics_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'wait_for_update': 3000
});
</script>

In the code above, in the 1st and 6th lines you need to replace G-ID with your actual website ID for Google Analytics. This article will help you find your ID - Find your Google tag ID.

Also, you can insert additional permissions (if required) after 11th line of the script above after ‘ad_personalization’: ‘denied’. Please make sure you’ve added them in this format:
‘your_permission’: ‘denied’

And then add the rest of the script to the Custom JS section on the Appearance tab in the widget editor:

const consents = ['ad_storage', 'analytics_storage', 'ad_user_data', 'ad_personalization'];

function sendEvent(config) {
    if (typeof gtag !== "undefined") {
        gtag('consent', config.action, {
            ...config.consents
        });
    }
}

function eappsDispatchAnalyticsEvent(event, selector, config) {
    function isHitClass(e, selector) {
        return e.target && e.target.closest(selector);
    }
    if (isHitClass(event, selector)) {
        sendEvent(config);
    }
}

const getConfig = (status) => ({
    action: 'update',
    consents: {
        ...consents.reduce((res, consent) => {
            res[consent] = status;
            return res;
        }, {})
    }
});

const answer = JSON.parse(localStorage.getItem("cookie-consent.answer"));
switch (answer) {
    case 'allow':
        sendEvent(getConfig('granted'));
        break;
    case 'decline':
        sendEvent(getConfig('denied'));
        break;
    default:
        document.addEventListener('click', function (event) {
            eappsDispatchAnalyticsEvent(event, '.eapp-cookie-consent-actions-accept', getConfig('granted'));
            eappsDispatchAnalyticsEvent(event, '.eapp-cookie-consent-actions-decline', getConfig('denied'));
        });
        break;
}
In the script above you can insert additional permissions in the first line after ‘ad_personalization’:
const consents = ['ad_storage', 'analytics_storage', 'ad_user_data', 'ad_personalization', 'your_permission'];

Note: it may take 48 hours for those updates to show up on Google Analytics.

Also, just a kindly reminder that our Cookie Consent widget should be installed on every page of your website to work correctly.

Test it out and let us know how it worked :slightly_smiling_face:


By the way, we have a Wishlist request for the Cookie Consent with actual blocker. You can upvote this idea here - Cookie consent with actual cookie blocker on decline

3 Likes

Just to be clear, I don’t have a need to use this widget. I was just commenting that for legal reasons if a person clicks they do not consent, there would need to be a way to prevent cookies. Also I might add to your reply above that there are lots of cookies that can be set, not just google analytics. For example, all our sites utilize statcounter to track visitors, and this involves placing a cookie.

2 Likes

Hi there, @Hugh :wave:

Your comment totally makes sense, and we absolutely agree with you. Thank you so much for the feedback!

The thing is that this widget was released before the new EU cookie regulations were introduced.

However, we do realize the importance of this feature n light of the recent changes, and our devs came up with this custom solution, which accepts/declines all cookies on the website. Some users already tested this workaround and found it really helpful.

We also have a request on the Wishlist for the Cookie Consent with actual blocker and if this idea gets more votes, we’ll try to consider it down the line :slightly_smiling_face:

1 Like

Sorry, I’m not a coder. It looked like your code only denied google cookies. Thanks.

2 Likes

No problem :wink:

2 Likes