# Consent banner blocks script

**URL:** <https://community.hubspot.com/t/consent-banner-blocks-script/103149>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [March 21, 2024, 7:32pm UTC](https://community.hubspot.com/t/consent-banner-blocks-script/103149 "2024-03-21T19:32:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/elty/32/58580_2.png) [@Elty](https://community.hubspot.com/u/Elty)\
**Post date:** [March 21, 2024, 7:32pm UTC](https://community.hubspot.com/t/consent-banner-blocks-script/103149/1 "2024-03-21T19:32:37Z")

</div>

We have a script running on our cms website, that opens a sidebar.

But after the decline decission the script gets blocked, this only works after consenting the cookies. This has nothing to do with cookies or tracking, how can we fix this ?

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [March 22, 2024, 12:07am UTC](https://community.hubspot.com/t/consent-banner-blocks-script/103149/2 "2024-03-22T00:07:55Z")

</div>

Hi @Elty

Is your script for opening a sidebar implemented via Google Tag Manager by chance?

---

<div class="post-metadata">

**Author:** ![Elty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/elty/32/58580_2.png) [@Elty](https://community.hubspot.com/u/Elty)\
**Post date:** [March 22, 2024, 7:49am UTC](https://community.hubspot.com/t/consent-banner-blocks-script/103149/3 "2024-03-22T07:49:59Z")

</div>

nope, they arent. Its a script loaded by another script and so on. Its a Jquery script and keeps loading in other scripts if needed but no external scripts all self written.

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [March 22, 2024, 1:57pm UTC](https://community.hubspot.com/t/consent-banner-blocks-script/103149/4 "2024-03-22T13:57:47Z")

</div>

Could you provide more information on how the script was placed? i.e. is it placed in the templates in Design Manager or in the header/footer in Website Settings?

Also, a link to the website would help be helpful for troubleshooting as well if you don’t mind sharing that.

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [March 22, 2024, 5:12pm UTC](https://community.hubspot.com/t/consent-banner-blocks-script/103149/5 "2024-03-22T17:12:15Z")

</div>

Just making a note that we chatted through DM and the scripts are loaded through requirejs.config in a template/partial.

```lia-code-sample
requirejs.config({
 urlArgs: "v={{ version }}", 
 paths: {
 jquery: 'https://code.jquery.com/jquery-x.x.x.min',
 slick: 'https://cdn2.hubspot.net/hubfs/xxxxxxx/slick.min',
 tabs: '{{ get_public_template_url( 'xxxxxxx/tabs.js') | cut('.js') }}',
 // etc.......
 }) ;

requirejs (['app']);

```

The HubSpot cookie consent should not be interfering with this kind of setup (i.e. not loading scripts, such as “slick.min.js”) and there might be something else going on - unless I am missing something.

I am not familiar enough with this to advise further - tagging [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) in case you have any insight.
