Skip to content

Quentin/plausible setup#48

Merged
flo-bit merged 3 commits into
eurosky/forkfrom
quentin/plausible-setup
Jun 10, 2026
Merged

Quentin/plausible setup#48
flo-bit merged 3 commits into
eurosky/forkfrom
quentin/plausible-setup

Conversation

@Spotchi

@Spotchi Spotchi commented Jun 10, 2026

Copy link
Copy Markdown

This pull request introduces a secondary analytics pipeline using Plausible Analytics, forwarding selected events to Plausible on web platforms, while keeping the primary metrics pipeline unchanged if that is not configured. It also adds environment-based feature flags to enable or disable major services (geolocation, live events, and app config) via environment variables.

Analytics Integration:

  • Added Plausible Analytics as an optional, privacy-focused secondary analytics sink, forwarding only an allowlisted set of high-level goal events on web platforms using the @plausible-analytics/tracker package. On Native platforms Plausible initialization is currently a no-op
  • Keep original MetricsClient if EXPO_PUBLIC_PLAUSIBLE_DOMAIN is not set, use plausible as event sync otherwise
  • Added new environment variables and documentation for configuring Plausible Analytics, including domain, API host, and debug mode. (EXPO_PUBLIC_PLAUSIBLE_DOMAIN, EXPO_PUBLIC_PLAUSIBLE_API_HOST, EXPO_PUBLIC_PLAUSIBLE_DEBUG)

Flags for services still using Bsky endpoints:

  • Introduced environment-based feature flags (EXPO_PUBLIC_ENABLE_GEOLOCATION, EXPO_PUBLIC_ENABLE_LIVE_EVENTS, EXPO_PUBLIC_ENABLE_APP_CONFIG) to selectively enable or disable geolocation, live events, and app config services at runtime.
  • Updated service initialization and data fetching logic throughout the codebase to respect these enablement flags, ensuring services are only initialized and queried if enabled.

Currently the underlying endpoints all trigger CORS failures, so this mainly cleans up the console errors and stops sending requests to bluesky servers that aren't the appview.

Spotchi and others added 3 commits June 10, 2026 19:04
Route metric events to a single analytics sink based on configuration:
when a Plausible domain is set, forward an allowlisted subset of goals to
Plausible (with identity / high-cardinality props stripped); otherwise
fall back to the primary metrics pipeline. On web, Plausible's tracker
auto-captures pageviews via the History API. Native Plausible is disabled
for now (the package is browser-only).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add EXPO_PUBLIC_ENABLE_{GEOLOCATION,LIVE_EVENTS,APP_CONFIG} flags to
  env/common.ts, defaulting true so production is unaffected
- Gate live events, app-config, and geolocation fetches behind their
  respective flags (both the query enabled condition and prefetch)
- Fix themes.ts circular dependency: import tokens directly from
  #/alf/tokens instead of going through the #/alf barrel, which could
  yield undefined during webpack module evaluation
- Set all three flags to false in .env for local dev

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Spotchi
Spotchi force-pushed the quentin/plausible-setup branch from 0edb9de to dd6aa55 Compare June 10, 2026 17:05
@flo-bit
flo-bit merged commit cfb05bc into eurosky/fork Jun 10, 2026
10 of 14 checks passed
@github-actions

Copy link
Copy Markdown
Old size New size Diff
8.14 MB 8.14 MB 0 B (0.00%)

@Spotchi
Spotchi deleted the quentin/plausible-setup branch June 10, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants