• Resolved Jaro

    (@pixtweaks)


    Hi, I have custom element that loads Video via JavaScript, I can’t find a way to trigger loading only after cookiyes banner been approved. Is there any way to do it in free version? Thank you

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @pixtweaks

    Greetings from CookieYes!

    Please share the URL of the site where you implemented this custom element.

    Thread Starter Jaro

    (@pixtweaks)

    Hello @cookieyesteam ,
    here is staging site, the hero image will load video from vimeo. https://med.speedweb.xyz/fr/
    Thank you!

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @pixtweaks

    Please check the working after adding the Vimeo cookies to your Cookie List from CookieYes > Cookie Manager > Cookie List.

    Thread Starter Jaro

    (@pixtweaks)

    @cookieyesteam all vimeo cookies are on the list

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @pixtweaks

    We checked the banner on your site, and couldn’t find the cookies listed. Please share a screenshot of your CookieYes dashboard > Cookie Manager > Cookie List.

    Thread Starter Jaro

    (@pixtweaks)

    @cookieyesteam https://go.screenpal.com/watch/cZQI6KVRScn
    they are on various places, this particular is under analytics tab

    But I would rather know if there is a event or some king of trigger I can place into my code, so
    when I get in Javascript if user already accepted and what has accepted.

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @pixtweaks

    Please confirm the site https://med.speedweb.xyz/fr/

    We couldn’t find cookies listed on the banner on this site.

    Thread Starter Jaro

    (@pixtweaks)

    This is the staging site, I just don’t want to list the domain here so I pass it to you via paste bin for privacy purposes, thank you
    https://pastebin.com/V7GBRvuv

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @pixtweaks

    Please exclude our script from the JavaScript optimisation on your site.

    Thread Starter Jaro

    (@pixtweaks)

    Hello @cookieyesteam, it has no effect on it. Probably pasebin URL didn’t work as expired. Here is the new one that is valid.
    https://pastebin.com/eQPtmufj
    There is a query string ?LSCWP_CTRL=before_optm that disables all caches and optimization, so with this you can see it doesn’t have an effect.

    As I said, I can adjust my code, but I need to know how to get from your code information about cookie approval status.

    Thank you!

    Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi @pixtweaks

    Please refer to this documentation on the cookie banner interaction event and perform the necessary action.

    Thread Starter Jaro

    (@pixtweaks)

    Thank you @cookieyesteam for pointing me in the right direction. Here is the code that works for me, when performance cookies are allowed it will log the console. It may help somebody else.

    document.addEventListener(‘cookieyes_consent_update’, function (e) {

        if (e.detail && e.detail.accepted.includes(‘performance’)) {

          console.log(‘Performance allowed for the first time’);

        }

    });

    document.addEventListener(‘cookieyes_banner_load’, function (e){

        if (e.detail && e.detail.categories && e.detail.categories.performance === true) {

            console.log(‘Performance allowed repeated load’);

        }

    });

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.