Custom HTML Tag seems not resolving variables as documented

Hi to all,

I’m tryng to insert a variable into a Custom HTML Tag as documented in tag page, using {{variableName}}.

But I receive this insted of value “window.MatomoTagManager.customHtmlDataStore[0]”.

Where i’m wrong?

Update:

I add some more info to have a best understanding of the problematic.

I created a custom variable that return the “pageID” number.

If I use this custom variable inside a custom Matomo HTML TAG, in this way (as normal HTML tag):

<strong>{{pageID}}</strong>

all is perfect and in the source code of the page I found the page id number!

But if I use the same custom variable to set a Custom Dimension, in this way (inside a js script) :

<script>_paq.push(['setCustomDimension', 1, '{{pageID}}']); </script>

The result is this:

_paq.push(['setCustomDimension', 1, 'window.MatomoTagManager.customHtmlDataStore[0]']);

I hope this could be helpfull.