@pixelmatters/markup 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,9 +37,9 @@ CDN drop-in (no build step) — paste this just before `</body>`:
37
37
  ```html
38
38
  <script type="module">
39
39
  // Pin the exact version — esm.sh resolves it from npm
40
- import { init } from 'https://esm.sh/@pixelmatters/markup@1.17.0'
40
+ import { init } from 'https://esm.sh/@pixelmatters/markup@1.18.0'
41
41
  // or
42
- // import { init } from 'https://esm.run/@pixelmatters/markup@1.17.0'
42
+ // import { init } from 'https://esm.run/@pixelmatters/markup@1.18.0'
43
43
 
44
44
  init({
45
45
  apiUrl: 'https://your-deployment.convex.site',
@@ -50,14 +50,14 @@ CDN drop-in (no build step) — paste this just before `</body>`:
50
50
  </script>
51
51
  ```
52
52
 
53
- > **Why pin the version?** CDN URLs without a version (`@pixelmatters/markup`) resolve to whatever's `latest` on npm — a future major release will break your page silently. Always pin (`@pixelmatters/markup@1.17.0`).
53
+ > **Why pin the version?** CDN URLs without a version (`@pixelmatters/markup`) resolve to whatever's `latest` on npm — a future major release will break your page silently. Always pin (`@pixelmatters/markup@1.18.0`).
54
54
 
55
55
  If your platform doesn't allow inline JS (some CMS / page-builder editors), use the auto-init form instead — point a `<script src=…>` at the bundle and pass config via `data-*` attributes:
56
56
 
57
57
  ```html
58
58
  <script
59
59
  type="module"
60
- src="https://esm.sh/@pixelmatters/markup@1.17.0"
60
+ src="https://esm.sh/@pixelmatters/markup@1.18.0"
61
61
  data-markup-widget="true"
62
62
  data-api-url="https://your-deployment.convex.site"
63
63
  data-api-key="markup_..."
@@ -159,6 +159,7 @@ Mounts the widget. Always tears down any existing instance before mounting, so c
159
159
  | `apiKey` | `string` | required | Project API key — mint one in the dashboard |
160
160
  | `position` | `'bottom-right' \| 'bottom-left' \| 'bottom-center'` | `'bottom-right'` | Initial placement for the toolbar — users can move it with the Position picker in the toolbar's overflow menu |
161
161
  | `theme` | `'light' \| 'dark' \| 'auto'` | `'auto'` | Initial theme — `'light'` or `'dark'`, or `'auto'` (default) to follow the host's `prefers-color-scheme`. Users can change this from the overflow menu; their choice persists and wins over this option from then on |
162
+ | `analytics` | `boolean` | `true` | Product telemetry — counts of widget interactions, sent to Markup. Adds no third-party script, sets no cookie, writes nothing to storage, and carries no identifier for your users. See [Product telemetry](#product-telemetry) |
162
163
  | `screenshots` | `ScreenshotsConfig` | capture enabled | Capture and PII-scrub options — see [Screenshots & privacy](#screenshots--privacy) |
163
164
  | `dashboardUrl` | `string` | — | Dashboard URL the identity menu links to as **Account →** for signed-in users; it also retargets the overflow menu's "Powered by Markup" line. Omit it and the Account entry is hidden — mostly useful for self-hosters, whose dashboard origin the widget can't know statically |
164
165
 
@@ -177,6 +178,27 @@ The floating action button was replaced by the toolbar pill in 1.15.0, and a pil
177
178
 
178
179
  </details>
179
180
 
181
+ ### Product telemetry
182
+
183
+ The widget reports counts of its own interactions — a comment started, a
184
+ comment submitted, a screenshot captured — so we can tell which parts of
185
+ it earn their place. Turn it off with `analytics: false`, or
186
+ `data-analytics="false"` on the script tag.
187
+
188
+ What it is not, concretely:
189
+
190
+ - **No third-party script.** Events post to your `apiUrl` on
191
+ `convex.site`, the same origin the widget already talks to. Nothing new
192
+ for your CSP, and no vendor SDK on your page.
193
+ - **No identifier for your users.** Events are keyed on the Markup
194
+ project, not the person. The session id is generated per page load, held
195
+ in memory, and gone when the tab closes.
196
+ - **No cookie, no `localStorage`.** Telemetry adds nothing to your page's
197
+ storage.
198
+ - **No content and no IP.** Comment text, page URLs, names, and email are
199
+ never sent. Events reach our analytics provider from our backend, so
200
+ your visitors' IP addresses never leave your site.
201
+
180
202
  ### `destroy()`
181
203
 
182
204
  Unmounts the widget and removes the host element. Safe to call when nothing is mounted.
@@ -336,7 +358,7 @@ For a `<script>` tag drop-in (no bundler), use the inline ESM form and **pin the
336
358
 
337
359
  ```html
338
360
  <script type="module">
339
- import { init } from 'https://esm.sh/@pixelmatters/markup@1.17.0'
361
+ import { init } from 'https://esm.sh/@pixelmatters/markup@1.18.0'
340
362
 
341
363
  init({
342
364
  apiUrl: '...',
@@ -352,7 +374,7 @@ If inline JS is disallowed (some CMS / page-builder editors), use the auto-init
352
374
  ```html
353
375
  <script
354
376
  type="module"
355
- src="https://esm.sh/@pixelmatters/markup@1.17.0"
377
+ src="https://esm.sh/@pixelmatters/markup@1.18.0"
356
378
  data-markup-widget="true"
357
379
  data-api-url="..."
358
380
  data-api-key="..."
package/dist/widget.d.ts CHANGED
@@ -48,6 +48,20 @@ export interface WidgetConfig {
48
48
  * isn't statically known to the widget.
49
49
  */
50
50
  dashboardUrl?: string;
51
+ /**
52
+ * Product telemetry — counts of widget interactions, sent to Markup.
53
+ * Default: enabled.
54
+ *
55
+ * What it is not: it adds no third-party script, sets no cookie and
56
+ * writes nothing to storage, and carries no identifier for the person
57
+ * using your site — events are keyed on the *project*, and the
58
+ * session id is generated per page load and discarded with the tab.
59
+ * No comment text, URLs, or names are ever sent.
60
+ *
61
+ * Set `false` if your privacy policy or DPA is easier to write
62
+ * without it.
63
+ */
64
+ analytics?: boolean;
51
65
  }
52
66
  /**
53
67
  * Mounts the feedback widget on the page. Idempotent — calling init again