When using Matomo Tag Manager with a cookie consent solution

I have set Cookieless tracking but I would like to use cookies when the user accepts cookies.

I have created a tag


which is triggered when the consent cookie contains a specific string pattern.

But for some reason, Matomo cookies are not loaded.

I have also tried to use the Data layer variable for the trigger when it uses specific value again it is not working

When I use debug mode both variables are registered by Matomo, but when inspecting the browser I see that no Matomo cookies are loaded

So I assume something is wrong with Tag or I am doing something wrong.

Hi @Srdjan_Nikolic
Did you follow all the Matomo documentation?

Also, do you see any error or warning in the browser console?