Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am stevehanlon on github.
  • I am stevehanlon (https://keybase.io/stevehanlon) on keybase.
  • I have a public key ASAPBEkV1Ucw6GUgkN0ZGoUgJFMORCg9pWrAig-LoWQOAAo

To claim this, I am signing this object:

@stevehanlon
stevehanlon / gist:5a6017bdfeefdf9f50c9c687654e183a
Created May 24, 2024 10:56
Tag manager variable for consent mode video
// this is the code used in the consent mode video at https://youtu.be/Z29FThETSug
// This example is for the 'necessary' cookie.
// You'll enter this JS into three variables corresponding to
// analytics, marketing and necessary
function () {
const cookietype = 'necessary'; // change this to analytics, marketing or necessary
// Function to get cookie by name
function getCookie(name) {