Script in Custom-Html Tag does not support nonce attribut

After a lot of trial and error and debugging we found out that it is not possible to set the nonce attribut in a script tag like this:

<script type="text/javascript" nonce={{nonce_value}}>

At some point Matomo is calling a function called “cloneScript” and in that function it is not cloning the nonce attribut.

Is there a reason for that? Unfortunately this means we cannot use the A/B testing feature of Matomo, unless there is another way to integrate the script.

Any ideas?

I think this is related to:

1 Like

Dear Phillipe, thank you for linking this issue, I guess that would solve my problem. I will try again with the new version as soon as it will be available.