How to insert Microsoft Clarity Script

The Clarity tool from Microsoft provides session recording and heatmaps generation.

I want to insert their javascript code into my app.

Their instructions says to put the code below inside the <head> tag:

    (function(c,l,a,r,i,t,y){
        c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
        t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
        y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
    })(window, document, "clarity", "script", "XXXXXXX");

I inserted it in App Settings -> Preloaded JS

But it's not working.

What do I have to do?

Thanks in advance.

Hi @reslley,

I think this would require a feature request, unfortunately :disappointed:

We have some analytics integrations as outlined here, so we could explore whether it's possible to create a Microsoft Clarity integration, and we have an internal feature request for supporting embedding <script> elements into Retool apps in general.