Skip to content

feat(analytics): add extport provider - #2578

Open
rxliuli wants to merge 3 commits into
wxt-dev:mainfrom
rxliuli:feat/analytics-extport-provider
Open

feat(analytics): add extport provider#2578
rxliuli wants to merge 3 commits into
wxt-dev:mainfrom
rxliuli:feat/analytics-extport-provider

Conversation

@rxliuli

@rxliuli rxliuli commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Overview

Adds an extport provider, following the same shape as the Moderok provider.

extport is an open, self-hostable platform for browser-extension developers (publishing, licensing, and analytics across Chrome/Firefox/Edge/Safari; ELv2 platform, MIT SDK). Its analytics protocol is deliberately minimal: one anonymous ping per install per UTC day — installs, actives, and churn are all derived server-side, and there are no custom events by design (the README section tells users to pair PostHog/Umami if they need event tracking).

Implementation notes

  • The daily ping is routed through analytics.track('__extport_ping') so the module's enabled consent gate applies to it like any other event (same pattern as Moderok's lifecycle events).
  • Respects Firefox 140+'s built-in data_collection consent (technicalAndInteraction) by re-checking permissions.getAll() at ping time — revocation needs no listener, and permissions.onAdded catches a user turning the toggle on later the same day.
  • The last-ping date stamp is only written after a confirmed 2xx, so a failed send retries on the next background wake-up; the server is idempotent per install per UTC day, so retries can never double-count.
  • event.user.id is reused as the install identifier — no provider-side id storage.

Changes: provider file, package.json exports entry, tsdown.config.ts entry, README TOC + section.

I'm the author of extport and run it in production across the ~20 extensions I maintain — happy to adjust anything to fit the package's conventions.

@rxliuli
rxliuli requested a review from aklinker1 as a code owner August 5, 2026 12:40
@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 8745812
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a7330e6645ba9000829d4ec
😎 Deploy Preview https://deploy-preview-2578--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/analytics Includes changes to the `packages/analytics` directory label Aug 5, 2026
rxliuli added a commit to rxliuli/extport that referenced this pull request Aug 7, 2026
analytics-design.md still said "design settled, not scheduled" —
Analytics has been live fleet-wide since 2026-08-05. Same for the
wxt-plugin analytics:true option (built, packages/wxt/src/index.ts)
and the "rides the next SDK wave" line (SDK 0.0.7 already shipped it).

licensing.md said slice C's acceptance was "pending deploy" — it's
been live and accepted for weeks; also closes out the README Phase 2
blurb forward-reference (the README no longer has one).

safari-pipeline.md hedged "until this lands, getState() tracks macOS
only" while its own later Verification section already confirmed both
platforms work — getState() requires an explicit platform and queries
each independently.

Also updates the wxt-dev/wxt#2578 provider PR note to reflect its
actual current state (open, not merged) instead of a vague future
conditional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/analytics Includes changes to the `packages/analytics` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant