Skip to content

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

site: PostHog keeps a localStorage id, so it sees country, returns and clicks

yetone3caa125f935a
diff --git a/site/public/docs/ja/privacy.html b/site/public/docs/ja/privacy.html
index ce3ce5d76..89f8b89b4 100644
--- a/site/public/docs/ja/privacy.html
+++ b/site/public/docs/ja/privacy.html
@@ -177,7 +177,7 @@
<li><code>/go/&lt;パートナー&gt;/site</code> と <code>/go/&lt;パートナー&gt;/keys</code>:パートナーの公式サイトとキーのページへのリンクをブラウザーで開くと、移動の前に <code>magpie partner go</code>(どのパートナーか、どのリンクか、地域、国)として数えます。</li>
<li><code>/api/icon?url=…</code>:プラグイン、インポートリンク、ライブラリが示すアイコンはここを経由して取得するので、アイコンのあるホストに見えるのはあなたではなく Cloudflare のアドレスです。画像を中継するだけで、数えることも記録することもしません。</li>
</ul>
- <p>サイト自身のページ(このドキュメント、ホーム)には Cloudflare Web Analytics と PostHog Web Analytics(<code>us.i.posthog.com</code>)が入っており、Cookie もブラウザへの保存も使わずにページビューを数えます。PostHog が受け取るのは各ページのアドレス、参照元のページ、ブラウザ・OS・画面サイズ、そして IP アドレスです(IP はハッシュ化した訪問者 ID にしたあと捨てられ、国は調べません)。クリックや画面の記録はせず、ブラウザが Do Not Track か Global Privacy Control を送っていれば何も送りません。アプリはどちらも読み込みません。コードは <a href="https://github.com/yetone/magpie/blob/main/site/worker.js">site/worker.js</a> です。</p>
+ <p>サイト自身のページ(このドキュメント、ホーム)には Cloudflare Web Analytics と PostHog Web Analytics(<code>us.i.posthog.com</code>)が入っており、どちらも Cookie は使いません。PostHog はこのサイト用のランダムな訪問者 ID をブラウザのローカルストレージに保存し、再訪問を同じ訪問者として数えます。受け取るのは各ページのアドレス、参照元のページ、ページ上でクリックしたもの(入力内容は含みません)、ページの読み込み速度、ブラウザ・OS・画面サイズ、IP アドレスの国と都市です。画面の録画はせず、ブラウザが Do Not Track か Global Privacy Control を送っていれば何も送りません。アプリはどちらも読み込みません。コードは <a href="https://github.com/yetone/magpie/blob/main/site/worker.js">site/worker.js</a> です。</p>
<h2 id="lists"><a class="anchor" href="#lists">magpie が取得する公開リスト</a></h2>
<p>モデルの価格と名前のために <a href="https://models.dev">models.dev</a> のカタログ(<code>models.dev/api.json</code>)を、あなたの通貨で価格を表示するために <code>open.er-api.com</code> から米ドルの為替レート(12 時間保持)を取得します。プラグインとその更新は npm レジストリから、ライブラリの項目は GitHub から取得します。どれも公開データの単なるダウンロードで、あなた、あなたのプロバイダー、使用量については何も送りません。ただし、どのリクエストとも同じく、これらのホストにはあなた(またはプロキシ)の IP アドレスが見えます。magpie は各プロバイダーにも、あなた自身のキーやサインインで残量とモデル一覧を尋ねます。<span class="ui">設定</span> → <span class="ui">利用枠</span> → <span class="ui">利用枠の読み込み</span> → <span class="ui">手動のみ</span> で、頼んだときに限れます。</p>
diff --git a/site/public/docs/privacy.html b/site/public/docs/privacy.html
index db9b6a66b..7f32585b3 100644
--- a/site/public/docs/privacy.html
+++ b/site/public/docs/privacy.html
@@ -177,7 +177,7 @@
<li><code>/go/&lt;partner&gt;/site</code> and <code>/go/&lt;partner&gt;/keys</code>: a partner’s website and key-page links, opened in your browser, are counted (the partner, which link, a region, a country) as <code>magpie partner go</code> before you are sent on.</li>
<li><code>/api/icon?url=…</code>: icons named by a plugin, an import link or the library are fetched through it, so their hosts see Cloudflare’s address, not yours. The worker passes the picture on and counts and keeps nothing.</li>
</ul>
- <p>The site’s own pages (these docs, the home page) carry Cloudflare Web Analytics and PostHog Web Analytics (<code>us.i.posthog.com</code>), which count page views without cookies or anything kept in your browser. PostHog gets each page’s address, the page that sent you, your browser, system and screen size, and your address, which it turns into a hashed visitor id and then drops (no country is looked up); no clicks, no recordings, and nothing at all when your browser sends Do Not Track or Global Privacy Control. The app doesn’t load either. The code is <a href="https://github.com/yetone/magpie/blob/main/site/worker.js">site/worker.js</a>.</p>
+ <p>The site’s own pages (these docs, the home page) carry Cloudflare Web Analytics and PostHog Web Analytics (<code>us.i.posthog.com</code>), without cookies. PostHog keeps a random visitor id in your browser’s local storage for this site, so a return visit counts as the same visitor. It gets each page’s address, the page that sent you, what you click on the page (not what you type), how fast the page loaded, your browser, system and screen size, and the country and city your address is in; never a recording of the screen, and nothing at all when your browser sends Do Not Track or Global Privacy Control. The app doesn’t load either. The code is <a href="https://github.com/yetone/magpie/blob/main/site/worker.js">site/worker.js</a>.</p>
<h2 id="lists"><a class="anchor" href="#lists">Public lists magpie fetches</a></h2>
<p>To price and name models magpie fetches the <a href="https://models.dev">models.dev</a> catalog (<code>models.dev/api.json</code>), and for prices in your currency the USD exchange rate from <code>open.er-api.com</code> (kept 12 hours). Plugins and their updates come from the npm registry, and the library’s items from GitHub. These are plain downloads of public data: nothing about you, your providers or your usage is sent, though, as with any request, those hosts see your IP address (or your proxy’s). magpie also asks each of your providers for your allowance and model list, with your own key or sign-in; <span class="ui">Settings</span> → <span class="ui">Allowances</span> → <span class="ui">Allowance reads</span> → <span class="ui">When I ask</span> limits those to when you ask.</p>
diff --git a/site/public/docs/zh/privacy.html b/site/public/docs/zh/privacy.html
index 0c05323f8..8434d560e 100644
--- a/site/public/docs/zh/privacy.html
+++ b/site/public/docs/zh/privacy.html
@@ -177,7 +177,7 @@
<li><code>/go/&lt;合作伙伴&gt;/site</code> 和 <code>/go/&lt;合作伙伴&gt;/keys</code>:在浏览器里打开合作伙伴的官网和 Key 页面链接时,先记一次 <code>magpie partner go</code>(哪个合作伙伴、哪个链接、地区、国家),再跳转。</li>
<li><code>/api/icon?url=…</code>:插件、导入链接和库里的图标经它获取,图标所在的服务器只看到 Cloudflare 的地址,看不到你的。它只转发图片,不计数也不记录。</li>
</ul>
- <p>网站自己的页面(这些文档、首页)带 Cloudflare Web Analytics 和 PostHog Web Analytics(<code>us.i.posthog.com</code>),不用 Cookie、不在浏览器里存任何东西地统计页面访问。PostHog 收到每个页面的地址、来源页面、浏览器、系统和屏幕尺寸,以及你的 IP(它把 IP 哈希成访客 id 后就丢掉,不查国家);不记录点击、不录屏,浏览器开了 Do Not Track 或 Global Privacy Control 就什么都不发。应用两者都不加载。代码见 <a href="https://github.com/yetone/magpie/blob/main/site/worker.js">site/worker.js</a>。</p>
+ <p>网站自己的页面(这些文档、首页)带 Cloudflare Web Analytics 和 PostHog Web Analytics(<code>us.i.posthog.com</code>),都不用 Cookie。PostHog 在浏览器的本地存储里为本站记一个随机访客 id,再次访问算同一位访客。它收到每个页面的地址、来源页面、你在页面上点了什么(不含输入的内容)、页面加载速度、浏览器、系统和屏幕尺寸,以及 IP 所在的国家和城市;从不录屏,浏览器开了 Do Not Track 或 Global Privacy Control 就什么都不发。应用两者都不加载。代码见 <a href="https://github.com/yetone/magpie/blob/main/site/worker.js">site/worker.js</a>。</p>
<h2 id="lists"><a class="anchor" href="#lists">magpie 拉取的公开列表</a></h2>
<p>为了给模型定价和命名,magpie 会拉取 <a href="https://models.dev">models.dev</a> 的模型目录(<code>models.dev/api.json</code>);为了用你的货币显示价格,会从 <code>open.er-api.com</code> 拉取美元汇率(缓存 12 小时)。插件及其更新来自 npm 仓库,库里的内容来自 GitHub。这些都是公开数据的普通下载,不发送任何关于你、你的供应商或用量的信息;和任何请求一样,这些主机能看到你的 IP(或代理的 IP)。magpie 还会用你自己的密钥或登录向各个供应商读取额度和模型列表;<span class="ui">设置</span> → <span class="ui">额度</span> → <span class="ui">额度刷新</span> → <span class="ui">仅手动</span> 可以只在你要求时才读。</p>
diff --git a/site/worker.js b/site/worker.js
index 1163c9a0b..24c747d21 100644
--- a/site/worker.js
+++ b/site/worker.js
@@ -311,12 +311,14 @@ function translate(res, lang) {
// beacon adds Cloudflare Web Analytics and PostHog's Web Analytics to a page.
// The dashboard's automatic injection skips whatever a worker returns, and
-// every page passes through this one. PostHog runs cookieless (nothing in
-// cookies or storage; the project's cookieless tracking setting must be on,
-// or its events are dropped), sends page views and page leaves only, and
-// isn't loaded under Do Not Track or Global Privacy Control (respect_dnt
-// alone doesn't stop a cookieless capture). Its project is the daily count's.
-const WEB_ANALYTICS = `<script>if(!(navigator.doNotTrack=="1"||window.doNotTrack=="1"||navigator.globalPrivacyControl)){!function(t,e){var o,n,p,r;e.__SV||(window.posthog&&window.posthog.__loaded)||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+" (stub)"},o="capture register unregister opt_out_capturing opt_in_capturing has_opted_out_capturing set_config".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);posthog.init("${POSTHOG_KEY}",{api_host:"https://us.i.posthog.com",cookieless_mode:"always",person_profiles:"identified_only",capture_pageview:true,capture_pageleave:true,autocapture:false,capture_dead_clicks:false,disable_session_recording:true,disable_surveys:true,advanced_disable_flags:true,respect_dnt:true})}</script>`;
+// every page passes through this one. PostHog keeps its visitor id in
+// localStorage, never a cookie: these pages vary on Cookie (the lang
+// cookie), and a per-visitor cookie would ride on every request. It isn't
+// cookieless, since cookieless drops the address before GeoIP and the
+// country with it. It sends page views and leaves, clicks (autocapture,
+// for heatmaps) and Web Vitals, never recordings, and isn't loaded under Do
+// Not Track or Global Privacy Control. Its project is the daily count's.
+const WEB_ANALYTICS = `<script>if(!(navigator.doNotTrack=="1"||window.doNotTrack=="1"||navigator.globalPrivacyControl)){!function(t,e){var o,n,p,r;e.__SV||(window.posthog&&window.posthog.__loaded)||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+" (stub)"},o="capture register unregister opt_out_capturing opt_in_capturing has_opted_out_capturing set_config".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);posthog.init("${POSTHOG_KEY}",{api_host:"https://us.i.posthog.com",persistence:"localStorage",person_profiles:"identified_only",capture_pageview:true,capture_pageleave:true,autocapture:true,enable_heatmaps:true,capture_performance:{web_vitals:true,network_timing:false},disable_session_recording:true,disable_surveys:true,advanced_disable_flags:true,respect_dnt:true})}</script>`;
const BEACON = `<script defer src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon='{"token": "c09e76abf16b40b2aa5571c196efb847"}'></script>` + WEB_ANALYTICS;
function beacon(res) {