Where to place a callback hook for cookie compliance

Hi all,

I could use some guidance for where to add a short .js callback-hook for cookie compliance. I am using Ghost4.0 and Liebling.

There are some very closely related threads, but I have not be able to find any advice for where to add this callback. I am using a popup tool creator by Osano - Cookie Consent, they provide a tool to create a consent button which can be found here: (click start coding on this page).

The advanced option for this button creator includes a script with a callback hook to disable/enable cookies depending on which option is clicked (this page). … I have tried, without success, to inject it into header/footer. but I think it needs to be placed in theme or perhaps the Ghost base? I can do this, but I’m not sure where to place it.

This tool is opensource on github, where they mention:

With version 4.0 you only need to attach the script as we’ve bundled everything together now. The initialization style has changed as have the callbacks (they’re gone). Please see the text below to get started.

…But the github links back to the previously linked script. I am a bit out of my depth, and would greatly appreciate any guidance that you can offer.

I use Ghost blog as an Audio & Visual portfolio, in doing this I embed SoundCloud playlists and YouTube videos (I do use youtube’s Privacy - enhanced modewith nocookie). The SoundCloud embeds result in a cookie sc_anonymous_id being implemented.


I’ve read through a bunch of related threads, but wasn’t able to find the info I that I’m looking for. But for anyone else who comes across this, you might be interested:

1 Like