How to store Client ID in local storage with Google Tag Manager

Hello everyone,

This is not a strictly Webflow related question, but I hope I can still get some assistance. I will delete it if told it’s out of scope.

The only consent-based cookie I use is Google analytics. I would like to store the client ID in local storage instead of a cookie, so I don’t need to show a cookie consent pop-up.

I have found this code sample in Google’s documentation: LINK
However, I am unfamiliar with GTM, so I don’t know how to set it up.

I would really appreciate it if someone could point me to the right direction.
What kind of tag/ variable do I need to set up?


Here is my site Read-Only: https://preview.webflow.com/preview/milkshaken?utm_medium=preview_link&utm_source=designer&utm_content=milkshaken&preview=eb61a7fc8076171446f88bcd514c8687&pageId=5fe61a74c9a53f4808bea94e&itemId=5fe61a74c9a53f7b03bea94f&mode=preview

Published: MILKSHAKEN