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
Comments
Comment #2
akalam commentedHere is a patch fixing it.
Comment #4
svenryen commentedComment #6
akalam commentedThank you for commiting this!