docs(analytics): explain the three SPM products#16249
Conversation
Closes firebase#15807. The Analytics integration ships three Swift Package products (FirebaseAnalytics, FirebaseAnalyticsCore, FirebaseAnalyticsIdentitySupport) and the difference between them is only visible by reading Package.swift and the underlying GoogleAppMeasurement dependencies. Adds a section to FirebaseAnalytics/README.md mapping each product to its measurement library, IDFA posture, and the use case that should drive the choice.
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Hi @tsushanth Thanks for the PR. Please fill out the CLA and we'll take a look |
|
@googlebot I signed it! |
htcgh
left a comment
There was a problem hiding this comment.
Thanks @tsushanth for doing this! I just have a couple of suggested edits.
|
|
||
| | Package product | Underlying measurement library | IDFA / advertising | When to use | | ||
| |-----------------|--------------------------------|--------------------|-------------| | ||
| | **`FirebaseAnalytics`** | `GoogleAppMeasurement` | Yes — collects IDFA when ATT-authorized; includes Google Signals + advertising features | Default for consumer apps that want full Analytics, audience targeting, and ad-network attribution | |
There was a problem hiding this comment.
| | **`FirebaseAnalytics`** | `GoogleAppMeasurement` | Yes — collects IDFA when ATT-authorized; includes Google Signals + advertising features | Default for consumer apps that want full Analytics, audience targeting, and ad-network attribution | | |
| | **`FirebaseAnalytics`** | `GoogleAppMeasurement` | Yes — collects IDFA when ATT-authorized; includes on-device conversion measurement | Default for consumer apps that want full Analytics, audience targeting, and ad-network attribution | |
| |-----------------|--------------------------------|--------------------|-------------| | ||
| | **`FirebaseAnalytics`** | `GoogleAppMeasurement` | Yes — collects IDFA when ATT-authorized; includes Google Signals + advertising features | Default for consumer apps that want full Analytics, audience targeting, and ad-network attribution | | ||
| | **`FirebaseAnalyticsCore`** | `GoogleAppMeasurementCore` | No | Apps that must avoid IDFA collection entirely (e.g., kids apps, restricted enterprise distributions, or apps whose privacy posture rules out any advertising-related data) | | ||
| | **`FirebaseAnalyticsIdentitySupport`** | `GoogleAppMeasurementCore` + `GoogleAppMeasurementIdentitySupport` | No IDFA, but enables privacy-respecting identity features (e.g., requestTrackingAuthorization integration without ad-targeting) | Apps that need user-deletion / identity-management integrations on top of Core but still don't want advertising-tier data collection | |
There was a problem hiding this comment.
| | **`FirebaseAnalyticsIdentitySupport`** | `GoogleAppMeasurementCore` + `GoogleAppMeasurementIdentitySupport` | No IDFA, but enables privacy-respecting identity features (e.g., requestTrackingAuthorization integration without ad-targeting) | Apps that need user-deletion / identity-management integrations on top of Core but still don't want advertising-tier data collection | | |
| | **`FirebaseAnalyticsIdentitySupport`** | `GoogleAppMeasurementCore` + `GoogleAppMeasurementIdentitySupport` | Yes - collects IDFA when ATT-authorized; excludes on-device conversion measurement | Apps that collect IDFA, but don't run any Google Ad campaigns | |
Why
Closes #15807.
The Firebase iOS SDK ships three Swift Package products under the Analytics umbrella — `FirebaseAnalytics`, `FirebaseAnalyticsCore`, and `FirebaseAnalyticsIdentitySupport` — and the difference between them is only discoverable by reading `Package.swift` and tracing each `Wrapper` target back to the underlying `GoogleAppMeasurement` product it pulls in. The issue reporter and the integration docs at firebase.google.com/docs/analytics/get-started both say "choose the analytics library" without explaining how to choose.
What
Adds a "Choosing the Right Analytics Product" section to `FirebaseAnalytics/README.md` with a table mapping each product to:
Plus a rule-of-thumb ("start with `FirebaseAnalytics` unless your privacy posture rules out advertising features") so a developer doesn't need to read `Package.swift` to make the call.
The pre-existing "manual screen view logging API" content is preserved unchanged below the new section.
Scope
Docs only. No code, no API surface changes.