diff --git a/packages/console/app/src/component/analytics-choice.css b/packages/console/app/src/component/analytics-choice.css new file mode 100644 index 00000000000..c45bbba383b --- /dev/null +++ b/packages/console/app/src/component/analytics-choice.css @@ -0,0 +1,22 @@ +/* The toggle reads as one of the page's links. */ +[data-component="analytics-choice"] button { + padding: 0; + border: 0; + background: none; + font: inherit; + color: var(--color-text-strong); + text-decoration: underline; + text-underline-offset: 2px; + text-decoration-thickness: 1px; + cursor: pointer; +} + +[data-component="analytics-choice"] button:hover { + text-decoration-thickness: 2px; +} + +@media print { + [data-component="analytics-choice"] { + display: none; + } +} diff --git a/packages/console/app/src/component/analytics-choice.tsx b/packages/console/app/src/component/analytics-choice.tsx new file mode 100644 index 00000000000..06dbc599dca --- /dev/null +++ b/packages/console/app/src/component/analytics-choice.tsx @@ -0,0 +1,67 @@ +import { createSignal, onMount, Show } from "solid-js" +import "./analytics-choice.css" + +const YEAR_SECONDS = 31_536_000 + +/** + * The Privacy Policy's on and off control for analytics in this browser. Off sets `oc_optout=1` for a year and + * deletes the analytics cookies (at `/` and at `/console`, where older pages wrote them) and the day's reported + * events in local storage; on deletes `oc_optout`. It writes the cookies itself, so it works without the tracker. + * A browser with Global Privacy Control is always off, so it shows no button. services/site has the same control. + */ +export function AnalyticsChoice() { + const [state, setState] = createSignal<"on" | "off" | "gpc">() + onMount(() => setState(readState())) + const toggle = () => { + setAnalytics(state() === "off") + setState(readState()) + } + return ( + + {(current) => ( +

+ + {current() === "on" + ? "Analytics are on in this browser." + : current() === "off" + ? "Analytics are off in this browser." + : "Analytics are off in this browser because it sends a Global Privacy Control signal."} + + + {" "} + + +

+ )} +
+ ) +} + +function readState() { + if ("globalPrivacyControl" in navigator && navigator.globalPrivacyControl === true) return "gpc" + return document.cookie.split(";").some((part) => part.trim() === "oc_optout=1") ? "off" : "on" +} + +function setAnalytics(on: boolean) { + const secure = location.protocol === "https:" ? "; Secure" : "" + if (on) { + document.cookie = `oc_optout=; Path=/; SameSite=Lax; Max-Age=0${secure}` + return + } + const cookies = [ + `oc_optout=1; Path=/; SameSite=Lax; Max-Age=${YEAR_SECONDS}${secure}`, + ...["oc_vid", "oc_sid", "oc_attr"].flatMap((name) => + ["/", "/console"].map((path) => `${name}=; Path=${path}; SameSite=Lax; Max-Age=0${secure}`), + ), + ] + cookies.forEach((cookie) => { + document.cookie = cookie + }) + try { + localStorage.removeItem("opencode-console.funnel.seen") + } catch { + // Storage the browser refuses holds nothing to clear. + } +} diff --git a/packages/console/app/src/routes/legal/privacy-policy/index.tsx b/packages/console/app/src/routes/legal/privacy-policy/index.tsx index 269cab1c034..2ac3ad95682 100644 --- a/packages/console/app/src/routes/legal/privacy-policy/index.tsx +++ b/packages/console/app/src/routes/legal/privacy-policy/index.tsx @@ -4,6 +4,7 @@ import { Title, Meta } from "@solidjs/meta" import { Header } from "~/component/header" import { Footer } from "~/component/footer" import { Legal } from "~/component/legal" +import { AnalyticsChoice } from "~/component/analytics-choice" import { LocaleLinks } from "~/component/locale-links" import { useLanguage } from "~/context/language" @@ -21,7 +22,7 @@ export default function PrivacyPolicy() {

Privacy Policy

-

Effective date: Nov 4, 2026

+

Effective date: Nov 6, 2026

At OpenCode, we take your privacy seriously. Please read this Privacy Policy to learn how we treat your @@ -86,7 +87,7 @@ export default function PrivacyPolicy() { Tracking Tools and Opt-Out

@@ -449,14 +450,7 @@ export default function PrivacyPolicy() { the Services, what pages visitors view on our Services and how long visitors are viewing pages on the Services. Performance/Analytical Cookies also help us measure the performance of our advertising campaigns in order to help us improve our campaigns and the Services' content for those who engage - with our advertising. For example, Google LLC ("Google") uses cookies in connection with its Google - Analytics services. Google's ability to use and disclose information collected by Google Analytics - about your visits to the Services is subject to the Google Analytics Terms of Use and the Google - Privacy Policy. You have the option to opt-out of Google's use of Cookies by visiting the Google - advertising opt-out page at{" "} - www.google.com/privacy_ads.html or the Google - Analytics Opt-out Browser Add-on at{" "} - https://tools.google.com/dlpage/gaoptout/. + with our advertising. @@ -475,19 +469,22 @@ export default function PrivacyPolicy() { http://www.allaboutcookies.org/.

-

Product Analytics on opencode.ai/console

+

Product Analytics on opencode.ai

- When you visit pages under opencode.ai/console, including the sign-in pages, we record the pages you - view, how long each page is visible, how long you're active on it and how far you scroll, the links and - buttons you click, and the type of any sign-in error. In the Console we record the pages you open and - the controls you use in its navigation, plan, billing and onboarding screens. We also record account and - workspace events: when you sign up, sign in, verify your email, approve a device, create or delete a - workspace, invite or remove members, create API keys, connect providers or clients, and start or - complete a checkout or payment, including its amount and any decline reason. We use these records to - understand how people find OpenCode and where they stop before signing up or subscribing, so we can - improve the Services. + When you visit opencode.ai, including the docs and the Console, we record the pages you view, how long + each page is visible, how long you're active on it, how far you scroll and how quickly it loads. We also + record the links and buttons you click, when you download an app or copy a command, when you search (but + not what you search for), and the type of any sign-in error. We record each click under a fixed name we + give that link or button, so text you or your team entered, such as workspace names or email addresses, + isn't recorded even when it appears on the page. We record account and workspace events: when you sign + up, sign in, verify your email, approve a device, create or delete a workspace, invite or remove + members, create API keys, connect providers or clients, and start or complete a checkout or payment, + including its amount and any decline reason. We use these records to understand how people find OpenCode + and where they stop before signing up or subscribing, so we can improve the Services.

+

We collect these records ourselves and don't use third-party analytics services on opencode.ai.

+

With each record sent from your browser, we keep the country, region and time zone your request came from, the type of device, operating system and browser you used, and the size of your browser window. We @@ -496,8 +493,8 @@ export default function PrivacyPolicy() {

- We set the following first-party Cookies. Your browser sends them only to opencode.ai/console. We also - keep a list in your browser's local storage of which events it has already reported that day. + We set the following first-party Cookies. Your browser sends them only to opencode.ai. We also keep a + list in your browser's local storage of which events it has already reported that day.

@@ -513,7 +510,7 @@ export default function PrivacyPolicy() { oc_vid A random ID for your browser - 1 year from when it's first set + 1 year from your latest visit oc_sid @@ -523,11 +520,16 @@ export default function PrivacyPolicy() { oc_attr - How you first and most recently arrived: the page you landed on, the domain of the website that - referred you, any campaign (UTM) parameters in the link, and the last sign-up or sign-in link - you clicked + The page you first and most recently landed on, the domain of the website that referred you and + any campaign (UTM) parameters in the link, plus the last link into the Console you clicked (a + sign-up or sign-in link, and the plan it was for, if any) and when you clicked it - 1 year + 1 year from the last time it changed + + + oc_optout + A record that you turned off analytics in this browser + 1 year from your latest visit @@ -538,6 +540,18 @@ export default function PrivacyPolicy() { that browser to your account. Records made while you're signed in carry your account ID directly.

+

+ If your browser sends a Global Privacy Control signal, or you{" "} + turn off analytics on this page + , we still record the page views, clicks and other browser events above, but without the IDs and arrival + details in oc_vid, oc_sid and oc_attr, and without your account or workspace ID. We delete those Cookies + and the local storage list from your browser and don't set them again while analytics are off. Account + and workspace events, such as sign-ups, payments and workspace changes, still carry your account ID, but + we don't link them or any other records to that browser, even if you're signed in. +

+ + +

We delete these records from our analytics database within a month after they turn 24 months old. We keep an archive copy of these records for longer. It contains your account ID if you were signed in, but diff --git a/services/site/src/component/site/analytics-choice.css b/services/site/src/component/site/analytics-choice.css new file mode 100644 index 00000000000..b0eea48ae63 --- /dev/null +++ b/services/site/src/component/site/analytics-choice.css @@ -0,0 +1,11 @@ +/* The status line keeps the document's reading width. */ +[data-slot="analytics-choice"] p { + max-inline-size: var(--measure); +} + +/* The control is about this browser, so a printed or saved copy leaves it out. */ +@media print { + [data-slot="analytics-choice"] { + display: none; + } +} diff --git a/services/site/src/component/site/analytics-choice.tsx b/services/site/src/component/site/analytics-choice.tsx new file mode 100644 index 00000000000..8829290bd7f --- /dev/null +++ b/services/site/src/component/site/analytics-choice.tsx @@ -0,0 +1,68 @@ +import { createSignal, onMount, Show } from "solid-js" +import "./analytics-choice.css" + +const YEAR_SECONDS = 31_536_000 + +/** + * The Privacy Policy's on and off control for analytics in this browser. Off sets `oc_optout=1` for a year and + * deletes the analytics cookies (at `/` and at `/console`, where older pages wrote them) and the day's reported + * events in local storage; on deletes `oc_optout`. It writes the cookies itself, so it works without the tracker. + * A browser with Global Privacy Control is always off, so it shows no button. + */ +export function AnalyticsChoice() { + const [state, setState] = createSignal<"on" | "off" | "gpc">() + onMount(() => setState(readState())) + const toggle = () => { + setAnalytics(state() === "off") + setState(readState()) + } + return ( + + {(current) => ( +

+

+ {current() === "on" + ? "Analytics are on in this browser." + : current() === "off" + ? "Analytics are off in this browser." + : "Analytics are off in this browser because it sends a Global Privacy Control signal."} +

+ +

+ +

+
+
+ )} + + ) +} + +function readState() { + if ("globalPrivacyControl" in navigator && navigator.globalPrivacyControl === true) return "gpc" + return document.cookie.split(";").some((part) => part.trim() === "oc_optout=1") ? "off" : "on" +} + +function setAnalytics(on: boolean) { + const secure = location.protocol === "https:" ? "; Secure" : "" + if (on) { + document.cookie = `oc_optout=; Path=/; SameSite=Lax; Max-Age=0${secure}` + return + } + const cookies = [ + `oc_optout=1; Path=/; SameSite=Lax; Max-Age=${YEAR_SECONDS}${secure}`, + ...["oc_vid", "oc_sid", "oc_attr"].flatMap((name) => + ["/", "/console"].map((path) => `${name}=; Path=${path}; SameSite=Lax; Max-Age=0${secure}`), + ), + ] + cookies.forEach((cookie) => { + document.cookie = cookie + }) + try { + localStorage.removeItem("opencode-console.funnel.seen") + } catch { + // Storage the browser refuses holds nothing to clear. + } +} diff --git a/services/site/src/component/site/legal-search.json b/services/site/src/component/site/legal-search.json index 5c94e6d23cc..803aa5e1984 100644 --- a/services/site/src/component/site/legal-search.json +++ b/services/site/src/component/site/legal-search.json @@ -7,7 +7,7 @@ { "id": "privacy-policy-table-of-contents", "title": "Privacy Policy Table of Contents", - "body": " What this Privacy Policy CoversPersonal DataCategories of Personal Data We CollectOur Commercial or Business Purposes for Collecting Personal DataOther Permitted Purposes for Processing Personal DataCategories of Sources of Personal DataHow We Disclose Your Personal DataTracking Tools and Opt-OutProduct Analytics on opencode.ai/consoleData SecurityPersonal Data of ChildrenCalifornia Resident Rights (\"CCPA\")Colorado Resident Rights (\"CPA\")Connecticut Resident Rights (\"CTDPA\")Delaware Resident Rights (\"DPDPA\")Iowa Resident Rights (\"ICDPA\")Montana Resident Rights (\"MCDPA\")Nebraska Resident Right", + "body": " What this Privacy Policy CoversPersonal DataCategories of Personal Data We CollectOur Commercial or Business Purposes for Collecting Personal DataOther Permitted Purposes for Processing Personal DataCategories of Sources of Personal DataHow We Disclose Your Personal DataTracking Tools and Opt-OutProduct Analytics on opencode.aiData SecurityPersonal Data of ChildrenCalifornia Resident Rights (\"CCPA\")Colorado Resident Rights (\"CPA\")Connecticut Resident Rights (\"CTDPA\")Delaware Resident Rights (\"DPDPA\")Iowa Resident Rights (\"ICDPA\")Montana Resident Rights (\"MCDPA\")Nebraska Resident Rights (\"NDPA", "path": "/legal/privacy-policy", "document": "Privacy Policy" }, @@ -111,8 +111,8 @@ }, { "id": "product-analytics", - "title": "Product Analytics on opencode.ai/console", - "body": " When you visit pages under opencode.ai/console, including the sign-in pages, we record the pages you view, how long each page is visible, how long you're active on it and how far you scroll, the links and buttons you click, and the type of any sign-in error. In the Console we record the pages you open and the controls you use in its navigation, plan, billing and onboarding screens. We also record account and workspace events: when you sign up, sign in, verify your email, approve a device, create or delete a workspace, invite or remove members, create API keys, connect providers or clients, an", + "title": "Product Analytics on opencode.ai", + "body": " When you visit opencode.ai, including the docs and the Console, we record the pages you view, how long each page is visible, how long you're active on it, how far you scroll and how quickly it loads. We also record the links and buttons you click, when you download an app or copy a command, when you search (but not what you search for), and the type of any sign-in error. We record each click under a fixed name we give that link or button, so text you or your team entered, such as workspace names or email addresses, isn't recorded even when it appears on the page. We record account and workspa", "path": "/legal/privacy-policy", "document": "Privacy Policy" }, diff --git a/services/site/src/component/site/legal.tsx b/services/site/src/component/site/legal.tsx index a9f7408d54f..2601913dbaa 100644 --- a/services/site/src/component/site/legal.tsx +++ b/services/site/src/component/site/legal.tsx @@ -21,6 +21,7 @@ import { type LegalNode, } from "~/lib/legal" import { legalSummaries } from "~/lib/legal/summaries" +import { AnalyticsChoice } from "./analytics-choice" import { CheckIcon, Chevron, CopyIcon, DownloadIcon, ExternalArrow, NewTab } from "./icons" import { copySelection } from "~/lib/clipboard" import { architectLabelCases, architectRules, legalHistoryViews, legalPrintStyles, siteSettings } from "./settings" @@ -705,6 +706,7 @@ function LegalBody(props: { }) { if (typeof props.node === "string") return props.node const node = props.node + if (node[0] === "analytics-choice") return if (published(node)) return // A note to the legal reviewers in a draft: shown only with Settings › Legal review notes. return ( diff --git a/services/site/src/lib/legal/history.ts b/services/site/src/lib/legal/history.ts index 786cc0ca3a7..35c1e1db10d 100644 --- a/services/site/src/lib/legal/history.ts +++ b/services/site/src/lib/legal/history.ts @@ -2,6 +2,96 @@ export const legalHistory = { "/legal/privacy-policy": [ + { + sha: "bc2891953b63dccfb3b688892b09009b9574caaa", + date: "2026-11-06", + subject: "docs(legal): cover analytics across opencode.ai and add an opt-out", + effective: "Nov 6, 2026", + first: false, + added: [ + "Effective date: Nov 6, 2026", + "Product Analytics on opencode.ai", + "When you visit opencode.ai, including the docs and the Console, we record the pages you view, how long each page is visible, how long you're active on it, how far you scroll and how quickly it loads.", + "We also record the links and buttons you click, when you download an app or copy a command, when you search (but not what you search for), and the type of any sign-in error.", + "We record each click under a fixed name we give that link or button, so text you or your team entered, such as workspace names or email addresses, isn't recorded even when it appears on the page.", + "We record account and workspace events: when you sign up, sign in, verify your email, approve a device, create or delete a workspace, invite or remove members, create API keys, connect providers or clients, and start or complete a checkout or payment, including its amount and any decline reason.", + "We collect these records ourselves and don't use third-party analytics services on opencode.ai.", + "Your browser sends them only to opencode.ai.", + "1 year from your latest visit", + "The page you first and most recently landed on, the domain of the website that referred you and any campaign (UTM) parameters in the link, plus the last link into the Console you clicked (a sign-up or sign-in link, and the plan it was for, if any) and when you clicked it", + "1 year from the last time it changed", + "oc_optout", + ], + removed: [ + "Effective date: Nov 4, 2026", + "Product Analytics on opencode.ai/console", + 'For example, Google LLC ("Google") uses cookies in connection with its Google Analytics services.', + "Google's ability to use and disclose information collected by Google Analytics about your visits to the Services is subject to the Google Analytics Terms of Use and the Google Privacy Policy.", + "You have the option to opt-out of Google's use of Cookies by visiting the Google advertising opt-out page at www.google.com/privacy_ads.html or the Google Analytics Opt-out Browser Add-on at https://tools.google.com/dlpage/gaoptout/.", + "When you visit pages under opencode.ai/console, including the sign-in pages, we record the pages you view, how long each page is visible, how long you're active on it and how far you scroll, the links and buttons you click, and the type of any sign-in error.", + "In the Console we record the pages you open and the controls you use in its navigation, plan, billing and onboarding screens.", + "We also record account and workspace events: when you sign up, sign in, verify your email, approve a device, create or delete a workspace, invite or remove members, create API keys, connect providers or clients, and start or complete a checkout or payment, including its amount and any decline reason.", + "Your browser sends them only to opencode.ai/console.", + "1 year from when it's first set", + "How you first and most recently arrived: the page you landed on, the domain of the website that referred you, any campaign (UTM) parameters in the link, and the last sign-up or sign-in link you clicked", + "1 year", + ], + addedCount: 16, + removedCount: 12, + source: + "https://github.com/anomalyco/opencode/blob/bc2891953b63dccfb3b688892b09009b9574caaa/packages/console/app/src/routes/legal/privacy-policy/index.tsx", + diff: "https://github.com/anomalyco/opencode/commit/bc2891953b63dccfb3b688892b09009b9574caaa#diff-86623c1b761ddcf78790804023aeabaca6b33689a83d2402241105bf407fdc31", + }, + { + sha: "926b2af0cc606398342b487a26ada2ee7badd39c", + date: "2026-11-05", + subject: "docs(legal): drop the cookie banner from the privacy policy (#62084)", + effective: "Nov 4, 2026", + first: false, + added: [], + removed: [ + "oc_consent", + "Your answer to our cookie banner, or that we don't need to ask you", + "180 days for an answer, 1 day otherwise", + "If you're in the European Economic Area, the United Kingdom or Switzerland, or we can't tell where you are, we ask before setting these Cookies.", + "If you're signed in to OpenCode, we set them without asking.", + "If you haven't accepted, we still record the events above, without these Cookies' IDs, so a visit's events can't be connected to each other or to earlier visits.", + "If you're signed in, those events still carry your account ID.", + "You can change your answer at any time with the Cookies button at the bottom of our marketing pages.", + ], + addedCount: 0, + removedCount: 8, + source: + "https://github.com/anomalyco/opencode/blob/926b2af0cc606398342b487a26ada2ee7badd39c/packages/console/app/src/routes/legal/privacy-policy/index.tsx", + diff: "https://github.com/anomalyco/opencode/commit/926b2af0cc606398342b487a26ada2ee7badd39c#diff-86623c1b761ddcf78790804023aeabaca6b33689a83d2402241105bf407fdc31", + }, + { + sha: "eb463de93ef91b3c9355ecfefe937c68556f0040", + date: "2026-11-04", + subject: "docs(legal): describe first-party product analytics in the privacy policy (#61905)", + effective: "Nov 4, 2026", + first: false, + added: [ + "Effective date: Nov 4, 2026", + "Product Analytics on opencode.ai/console", + "When you visit pages under opencode.ai/console, including the sign-in pages, we record the pages you view, how long each page is visible, how long you're active on it and how far you scroll, the links and buttons you click, and the type of any sign-in error.", + "In the Console we record the pages you open and the controls you use in its navigation, plan, billing and onboarding screens.", + "We also record account and workspace events: when you sign up, sign in, verify your email, approve a device, create or delete a workspace, invite or remove members, create API keys, connect providers or clients, and start or complete a checkout or payment, including its amount and any decline reason.", + "We use these records to understand how people find OpenCode and where they stop before signing up or subscribing, so we can improve the Services.", + "With each record sent from your browser, we keep the country, region and time zone your request came from, the type of device, operating system and browser you used, and the size of your browser window.", + "We use your IP address to determine your country and region and to limit requests, but we don't store it, your email address or anything you type in these records.", + "We set the following first-party Cookies.", + "Your browser sends them only to opencode.ai/console.", + "We also keep a list in your browser's local storage of which events it has already reported that day.", + "Cookie", + ], + removed: ["Effective date: Mar 6, 2026"], + addedCount: 38, + removedCount: 1, + source: + "https://github.com/anomalyco/opencode/blob/eb463de93ef91b3c9355ecfefe937c68556f0040/packages/console/app/src/routes/legal/privacy-policy/index.tsx", + diff: "https://github.com/anomalyco/opencode/commit/eb463de93ef91b3c9355ecfefe937c68556f0040#diff-86623c1b761ddcf78790804023aeabaca6b33689a83d2402241105bf407fdc31", + }, { sha: "19d00098910af21b33458ba4ea011c25d472f8b7", date: "2026-08-24", diff --git a/services/site/src/lib/legal/privacy-policy.ts b/services/site/src/lib/legal/privacy-policy.ts index d1678c17867..7a4e05cfc06 100644 --- a/services/site/src/lib/legal/privacy-policy.ts +++ b/services/site/src/lib/legal/privacy-policy.ts @@ -4,7 +4,7 @@ export const privacyPolicy: LegalDocumentContent = { path: "/legal/privacy-policy", title: "Privacy Policy", metaTitle: "OpenCode | Privacy Policy for the website and services", - effective: "Effective date: Nov 4, 2026", + effective: "Effective date: Nov 6, 2026", description: "How OpenCode collects, uses, shares and protects your personal data when you use the OpenCode website, apps and hosted services, and the choices you have.", body: [ @@ -63,7 +63,7 @@ export const privacyPolicy: LegalDocumentContent = { "li", {}, ["a", { href: "#tracking-tools" }, "Tracking Tools and Opt-Out"], - ["ul", {}, ["li", {}, ["a", { href: "#product-analytics" }, "Product Analytics on opencode.ai/console"]]], + ["ul", {}, ["li", {}, ["a", { href: "#product-analytics" }, "Product Analytics on opencode.ai"]]], ], ["li", {}, ["a", { href: "#data-security" }, "Data Security"]], ["li", {}, ["a", { href: "#personal-data-of-children" }, "Personal Data of Children"]], @@ -425,11 +425,7 @@ export const privacyPolicy: LegalDocumentContent = { "li", {}, ["strong", {}, "Performance/Analytical Cookies."], - " Performance/Analytical Cookies allow us to understand how visitors use our Services. They do this by collecting information about the number of visitors to the Services, what pages visitors view on our Services and how long visitors are viewing pages on the Services. Performance/Analytical Cookies also help us measure the performance of our advertising campaigns in order to help us improve our campaigns and the Services' content for those who engage with our advertising. For example, Google LLC (\"Google\") uses cookies in connection with its Google Analytics services. Google's ability to use and disclose information collected by Google Analytics about your visits to the Services is subject to the Google Analytics Terms of Use and the Google Privacy Policy. You have the option to opt-out of Google's use of Cookies by visiting the Google advertising opt-out page at ", - ["a", { href: "http://www.google.com/privacy_ads.html" }, "www.google.com/privacy_ads.html"], - " or the Google Analytics Opt-out Browser Add-on at ", - ["a", { href: "https://tools.google.com/dlpage/gaoptout/" }, "https://tools.google.com/dlpage/gaoptout/"], - ".", + " Performance/Analytical Cookies allow us to understand how visitors use our Services. They do this by collecting information about the number of visitors to the Services, what pages visitors view on our Services and how long visitors are viewing pages on the Services. Performance/Analytical Cookies also help us measure the performance of our advertising campaigns in order to help us improve our campaigns and the Services' content for those who engage with our advertising.", ], ], [ @@ -444,13 +440,13 @@ export const privacyPolicy: LegalDocumentContent = { ["a", { href: "http://www.allaboutcookies.org/" }, "http://www.allaboutcookies.org/"], ".", ], - // Carried over from dev: #61905 (first-party product analytics) and #62084 (no cookie banner). Needs legal sign-off. - ["h3", { id: "product-analytics" }, "Product Analytics on opencode.ai/console"], + ["h3", { id: "product-analytics" }, "Product Analytics on opencode.ai"], [ "p", {}, - "When you visit pages under opencode.ai/console, including the sign-in pages, we record the pages you view, how long each page is visible, how long you're active on it and how far you scroll, the links and buttons you click, and the type of any sign-in error. In the Console we record the pages you open and the controls you use in its navigation, plan, billing and onboarding screens. We also record account and workspace events: when you sign up, sign in, verify your email, approve a device, create or delete a workspace, invite or remove members, create API keys, connect providers or clients, and start or complete a checkout or payment, including its amount and any decline reason. We use these records to understand how people find OpenCode and where they stop before signing up or subscribing, so we can improve the Services.", + "When you visit opencode.ai, including the docs and the Console, we record the pages you view, how long each page is visible, how long you're active on it, how far you scroll and how quickly it loads. We also record the links and buttons you click, when you download an app or copy a command, when you search (but not what you search for), and the type of any sign-in error. We record each click under a fixed name we give that link or button, so text you or your team entered, such as workspace names or email addresses, isn't recorded even when it appears on the page. We record account and workspace events: when you sign up, sign in, verify your email, approve a device, create or delete a workspace, invite or remove members, create API keys, connect providers or clients, and start or complete a checkout or payment, including its amount and any decline reason. We use these records to understand how people find OpenCode and where they stop before signing up or subscribing, so we can improve the Services.", ], + ["p", {}, "We collect these records ourselves and don't use third-party analytics services on opencode.ai."], [ "p", {}, @@ -459,7 +455,7 @@ export const privacyPolicy: LegalDocumentContent = { [ "p", {}, - "We set the following first-party Cookies. Your browser sends them only to opencode.ai/console. We also keep a list in your browser's local storage of which events it has already reported that day.", + "We set the following first-party Cookies. Your browser sends them only to opencode.ai. We also keep a list in your browser's local storage of which events it has already reported that day.", ], [ "div", @@ -476,7 +472,7 @@ export const privacyPolicy: LegalDocumentContent = { {}, ["td", {}, "oc_vid"], ["td", {}, "A random ID for your browser"], - ["td", {}, "1 year from when it's first set"], + ["td", {}, "1 year from your latest visit"], ], [ "tr", @@ -492,9 +488,16 @@ export const privacyPolicy: LegalDocumentContent = { [ "td", {}, - "How you first and most recently arrived: the page you landed on, the domain of the website that referred you, any campaign (UTM) parameters in the link, and the last sign-up or sign-in link you clicked", + "The page you first and most recently landed on, the domain of the website that referred you and any campaign (UTM) parameters in the link, plus the last link into the Console you clicked (a sign-up or sign-in link, and the plan it was for, if any) and when you clicked it", ], - ["td", {}, "1 year"], + ["td", {}, "1 year from the last time it changed"], + ], + [ + "tr", + {}, + ["td", {}, "oc_optout"], + ["td", {}, "A record that you turned off analytics in this browser"], + ["td", {}, "1 year from your latest visit"], ], ], ], @@ -504,6 +507,15 @@ export const privacyPolicy: LegalDocumentContent = { {}, "When you create an account, sign in, verify your email or approve a device, we link the records from that browser to your account. Records made while you're signed in carry your account ID directly.", ], + [ + "p", + {}, + "If your browser sends a Global Privacy Control signal, or you ", + ["a", { href: "https://opencode.ai/legal/privacy-policy#product-analytics" }, "turn off analytics on this page"], + ", we still record the page views, clicks and other browser events above, but without the IDs and arrival details in oc_vid, oc_sid and oc_attr, and without your account or workspace ID. We delete those Cookies and the local storage list from your browser and don't set them again while analytics are off. Account and workspace events, such as sign-ups, payments and workspace changes, still carry your account ID, but we don't link them or any other records to that browser, even if you're signed in.", + ], + // The on and off control for this browser (AnalyticsChoice); the Markdown version leaves it out. + ["analytics-choice", {}], [ "p", {},