A brief history of cookies and how they are set up

At first, I didn't want to do anything with this blog in terms of tracking, third-party services, etc.. But my plan is to also display GPX data in an OSM map and possibly integrate YouTube videos. So I got started and implemented single opt-ins, which inform the user and set a local cookie to remember the decision when consent is given. Then there was the thing with the comment form. Without any protection, this is bound to generate a lot of spam. So I had to put a captcha in front of it. Friendly Captcha is not supported by the blog extension - but Google reCAPTCHA is. So I built an opt-in for this too. Three simple opt-ins - fine.

The next step in publishing the blog site was to create privacy and imprint pages. Hey, this is a harmless, private site. What they don't all want...
Since I don't know much about this, I looked for an online service that would put together the text modules for me. I found Termly.

Once the texts were set, I thought about the fact that Termly could also take care of my three opt-ins. To do this, you "simply" search the page for cookies and integrate their consent tool. Of course, no cookies were found (except for the typo3_fe_user cookie, which I don't actually need, but can't turn off either). Ok, then I'll just note the cookies manually at Termly. Unfortunately, it wasn't as I had hoped that Termly would be able to manage the cookies in its banner. So I tried a little more technology: Google Tag Manager (GTM).

The GTM account was quickly created and GTM was also quickly integrated. Now it was RTFM - read the fucking manual. It got really complicated. Creating tags, defining events, linking everything together, then going back to the preview and testing again and again, not knowing why it wasn't working and then starting all over again. With the help of a template in Temply's GTM, it was eventually possible to display the cookie banner on the website and to capture the corresponding events when loading the banner and making changes in the GTM. The plan now is to set my three cookies according to the user's settings in the banner. Unfortunately, Temply is not so quick to output the manually added cookie definitions in the banner (said the super-friendly support via chat). So I'll have to wait another day or two before I can continue.

The blog was created out of curiosity about the blog extension and boredom. Then I came up with the idea of integrating Google Analytics to see what might be going on here. It's my first blog and I don't know if there is an audience for my stuff. I don't really like all those cookie banners, but I probably have one anyway. And anyone who wants to be tracked is welcome to do so. Fortunately, the banner is rather inconspicuous and doesn't block the entire page.
Integrating Google Analytics is a very simple matter: create an account and insert the embed code. But then it's always there and no opt-in. So RTFM again. Somehow I managed to do it the way I want it to work for my three cookies later on. Google Analytics is only loaded after consent, which is regulated via Termly.

It's crazy: Google Tag Manager is loaded. GTM then loads the Termly banner. Termly then checks the user's settings and triggers events that are received again in GTM. Tags are then triggered there in turn, which then load Google Analytics again via GTM, for example.


Update+1 day

Screenshot: Google Tag Manager-Tags

Today, the manually added cookies are also displayed in Termly. So now I have to bring it all together. One problem is that I have three individual opt-ins, but Termly can only activate or deactivate one category of cookies. So with a Termly event (accept or reject everything in a category), I can only activate or deactivate all three opt-ins.

The Termly template at GTM already came with a "Category accepted event", which I could use to activate all my opt-ins in a script then injected by GTM.
I still had to create the "Category rejected event" as a trigger in GTM and deactivate my opt-ins accordingly.

The next problem: If my opt-ins are already initialized and, for example, reCAPTCHA is already present, it is not so easy to remove it. Activating and deactivating a category without reloading the page results in an error. The page cannot be reloaded automatically when deactivating because the category rejected event is also executed when the page is loaded. A bit confusing.

This is now also the point where it should be good and I no longer want to continue. It's getting more and more extensive and complicated and at some point I can't get my head around it any more. Especially not after a long time, when something needs to be changed.

There are now Termly, GTM, three opt-ins, a few GTM triggers and a few GTM tags, which in turn inject script into the page. And everything has to work together... Just to query these fucking cookies. I'm hungry. Let's see if I can still find some real cookies in the cupboard.

Comments

No Comments

Write comment

Fields marked with * are mandatory.

By using this form you agree with the storage and handling of your data by this website. Name and comment will be published. Your email address will not be published and will only be used to get in touch with you if there is a need to do so.

You can find more information in the privacy policy.

Related posts

Previous

Next