Problem/Motivation

I want to disable google tag script through if the consent isn't given.

I create a cookie category, and in the disable javascript textarea (Disable the following JavaScripts when consent isn't given) I add the file path associating it to the category:
functional:public://google_tag/EXAMPLE/google_tag.script.js

When I load the page, the cookie banner appears and before accepting cookies the script has already been applied.

There is a related issue, which is already commited, that only checks for disabled scripts in page html_head in the hook_page_attachments().
Related issue

CommentFileSizeAuthor
#2 eu_cookie_compliance-3117716-2.patch3.19 KBakalam

Comments

alzz created an issue. See original summary.

akalam’s picture

Status: Active » Needs review
StatusFileSize
new3.19 KB

Here is a patch fixing it.

  • svenryen committed d25a1c1 on 8.x-1.x authored by akalam
    Issue #3117716 by akalam: Remove disabled scripts appended in...
svenryen’s picture

Status: Needs review » Fixed

  • a3ad136 committed on 8.x-1.x
    Merge remote-tracking branch 'origin/8.x-1.x' into 8.x-1.x
    
    * origin/8.x...
akalam’s picture

Thank you for commiting this!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.