mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-07-14 18:15:56 -04:00
fix: remove App Tracking Transparency (ATT) from native analytics flow
- Drop `expo-tracking-transparency` dependency and plugin config from `app.json` - Replace `applyTrackingTransparency` with `initAnalytics()` that simply syncs PostHog opt-in/out from the stored preference on startup - Remove ATT permission prompt, IDFA/AAID identification, and one-time migration logic from `posthog.ts` - Analytics now starts disabled on both iOS and Android; user opts in via Settings toggle - Update telemetry docs and privacy policy to reflect the simplified consent flow (no ATT prompt, no advertising IDs)
This commit is contained in:
@@ -10,11 +10,11 @@ Sofa includes optional, privacy-focused telemetry to help understand how the pro
|
||||
|
||||
Sofa has two separate telemetry systems depending on the platform:
|
||||
|
||||
| | Server | Mobile App | Web App |
|
||||
| ----------- | ---------------- | ----------------- | ------- |
|
||||
| **System** | Custom reporting | PostHog | None |
|
||||
| **Default** | Disabled | Disabled | N/A |
|
||||
| **Opt-in** | Admin toggle | User toggle + ATT | N/A |
|
||||
| | Server | Mobile App | Web App |
|
||||
| ----------- | ---------------- | ------------ | ------- |
|
||||
| **System** | Custom reporting | PostHog | None |
|
||||
| **Default** | Disabled | Disabled | N/A |
|
||||
| **Opt-in** | Admin toggle | User toggle | N/A |
|
||||
|
||||
The web app has **zero analytics** — no tracking scripts, no third-party services.
|
||||
|
||||
@@ -81,15 +81,7 @@ The native iOS and Android app uses [PostHog](https://posthog.com/) for anonymou
|
||||
|
||||
### Consent Flow
|
||||
|
||||
On iOS, the app follows Apple's App Tracking Transparency (ATT) framework:
|
||||
|
||||
1. On first launch, iOS prompts you to allow or deny tracking
|
||||
2. If you allow, analytics is enabled by default (you can still disable it in settings)
|
||||
3. If you deny, analytics stays disabled
|
||||
|
||||
On Android, analytics starts disabled and can be toggled on in settings.
|
||||
|
||||
Regardless of platform, you can change your preference at any time in **Settings → Anonymous Usage Reporting**.
|
||||
Analytics starts disabled on both iOS and Android. You can enable it in **Settings → Anonymous Usage Reporting** and change your preference at any time.
|
||||
|
||||
### What Gets Tracked
|
||||
|
||||
@@ -108,13 +100,11 @@ When analytics is enabled:
|
||||
|
||||
### Identification
|
||||
|
||||
When analytics is enabled, the app uses your device's platform advertising ID (IDFA on iOS, AAID on Android) as an anonymous identifier. This is the same ID managed by your device's privacy settings — if you've disabled ad tracking at the OS level, the app won't attempt to use it.
|
||||
|
||||
No other identifying information is sent.
|
||||
PostHog generates an anonymous, random device identifier. No advertising IDs, personal data, or other identifying information is sent.
|
||||
|
||||
### Disabling
|
||||
|
||||
Toggle analytics off in **Settings → Anonymous Usage Reporting**. This immediately opts out of PostHog and stops all event collection. Your explicit preference persists even if ATT permissions change later.
|
||||
Toggle analytics off in **Settings → Anonymous Usage Reporting**. This immediately opts out of PostHog and stops all event collection.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ export default function PrivacyPolicyPage() {
|
||||
return (
|
||||
<article className="prose prose-sm prose-invert [&_a]:text-fd-primary hover:[&_a]:text-fd-primary/80 [&_h2]:font-display [&_h3]:font-display [&_p]:text-fd-muted-foreground [&_li]:text-fd-muted-foreground [&_strong]:text-fd-foreground mx-auto max-w-3xl px-6 py-16 [&_a]:underline [&_a]:underline-offset-4 [&_h2]:mt-10 [&_h2]:mb-4 [&_h2]:border-b [&_h2]:pb-2 [&_h2]:text-2xl [&_h2]:font-semibold [&_h3]:mt-8 [&_h3]:mb-3 [&_h3]:text-xl [&_h3]:font-normal [&_li]:text-[15px] [&_li]:leading-relaxed [&_p]:text-[15px] [&_p]:leading-relaxed [&_strong]:font-medium [&_ul]:space-y-1">
|
||||
<h1 className="font-display mb-2 text-3xl font-semibold tracking-tight">Privacy Policy</h1>
|
||||
<p className="text-fd-muted-foreground/60 !mt-0 mb-8 text-sm">Last updated: March 16, 2026</p>
|
||||
<p className="text-fd-muted-foreground/60 !mt-0 mb-8 text-sm">Last updated: March 22, 2026</p>
|
||||
|
||||
<p>
|
||||
Sofa is a self-hosted application. When you run Sofa, your data lives on your own server and
|
||||
@@ -109,8 +109,8 @@ export default function PrivacyPolicyPage() {
|
||||
The native iOS and Android app includes optional, anonymous analytics powered by PostHog.
|
||||
This tracks screen views and app lifecycle events — no personal data, search queries,
|
||||
or watch history is collected. Analytics is <strong>disabled by default</strong> and
|
||||
requires explicit opt-in. On iOS, Apple’s App Tracking Transparency prompt is shown
|
||||
first. You can change your preference at any time in the app’s settings.
|
||||
requires explicit opt-in. You can change your preference at any time in the app’s
|
||||
settings.
|
||||
</p>
|
||||
|
||||
<h3>Media Server Integrations</h3>
|
||||
|
||||
Reference in New Issue
Block a user