django-cookie-consent icon indicating copy to clipboard operation
django-cookie-consent copied to clipboard

Page not reloaded or script not triggered after cookies accept

Open frobert opened this issue 1 year ago • 1 comments

Hi there, we are having an issue with triggering the sciprts after cookie consent was accepted.

in the tamplete we have a code

{% if request|cookie_group_accepted:"optional" %}
<script>
  dataLayer.push({
    event: 'cookies_consent',
  });
</script>
{% endif %}

that should trigger the event after the cookies are confirmed, but after confirming nothing is happening, the script is not triggered nor the page is reloaded... The script is triggered after manually reloading the page.

please advice...

thanks

frobert avatar Jan 18 '24 11:01 frobert