是否可以在Electron应用程序中使用Microsoft Clarity?

gopyfrb3  于 8个月前  发布在  Electron
关注(0)|答案(1)|浏览(95)

我试图在我的Electron应用程序中使用Microsft-Clarity https://clarity.microsoft.com/.我在我的应用程序的主页的头部部分添加了他们的集成步骤.在运行应用程序时,在网络部分,它是shoiwng网络调用https://d/clarity.ms/collect,但它是在响应中给出400坏请求错误.
我用的是Electron 13.x版
是否可以在Electron应用程序中使用Clarity?或者我需要做任何特定的更改来支持它?
我在页面的头部添加了以下代码

<script type="text/javascript">
    (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", "<Project_id>");
</script>

字符串
正在为以下URL发出POST请求:
https://d/clarity.ms/collect
请求标头具有以下值

authority: d.clarity.ms
method: POST
path: /collect
scheme: https
accept: application/x-clarity-gzip
accept-encoding: gzip, deflate, br
accept-language: en-US
content-length: 285595
cookie: MUID=XXXXXXXXXXXXXXXXXXXXX
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) XXXXXX/XXXXX Chrome/91.0.4472.164 Electron/13.6.9 Safari/537.36


获取请求的以下响应

{  
     "type":"https://tools.ietf.org/html/rfc7231#section-6.5.1",
     "title":"Bad Request",
     "status":400,
     "traceId":"00-xxxxxxxxxxxxxxx-xxxxxxxxxxxx-00"
}

7xzttuei

7xzttuei1#

我们目前不支持电子应用程序。将考虑这作为反馈。

相关问题