Problem using the custom variable "Environment"

Hi, I’ve tried to set up multiple environments in Matomo Tag Manager and Analytics, see below

But I can’t make it work. Can someone tell me if there’s anything I’m doing wrong?

Thanks a lot!

I’ve created the custom variable “SiteId” of type “constant” (screenshot below) and set the parameter “Matomo idsite” of my Matomo Config to {{SiteId}}.

Unfortunately, the query string parameter “idsite” in the URL call to Matomo analytics doesn’t get filled with the site ID, but with the string “environment”.