You want an AI coding agent to handle the repetitive parts of Firebase analytics without quietly damaging the data your product, marketing, and advertising decisions depend on. The fastest route isn’t a broad prompt such as “set up analytics.” It is a narrow measurement contract, a controlled code change, and a verification pass with explicit acceptance criteria.
Google Analytics for Firebase agent skills can now guide supported coding agents through SDK integration and screen-view logging in iOS and Android apps. That can remove implementation friction. It doesn’t decide what you should measure, prove that the resulting data is accurate, or turn incomplete tracking into reliable attribution.
Give the agent a measurement contract, not a vague request
The first release has a deliberately narrow job: help a coding agent integrate the Google Analytics for Firebase SDK and implement screen-view tracking. It is a development aid, not a new reporting feature inside Google Analytics. Support for more development tasks is planned, but you shouldn’t treat planned functionality as available functionality.
That boundary matters because “track the app” can mean several different things. A developer might interpret it as logging every route. A marketer might mean measuring activation and purchases. A product manager might want to understand where onboarding fails. Screen views can contribute to all three questions, but they don’t answer them by themselves.
Before an agent touches the repository, create a small tracking contract. For each screen in scope, record the following decisions:
| Contract field | Decision to document | Why it matters |
|---|---|---|
| Business question | The user behavior this screen helps you understand | Prevents tracking from becoming an inventory with no analytical purpose |
| Canonical screen name | One stable name used across platforms | Avoids splitting one concept into multiple report rows |
| Display condition | The precise point at which a view should be recorded | Reduces missing and duplicate views |
| Platform mapping | The iOS and Android components representing the same screen | Keeps cross-platform comparisons interpretable |
| Expected transitions | The screens a user can reach before and after it | Creates concrete navigation tests |
| Collection condition | The existing consent or analytics state required before logging | Stops the implementation from bypassing established controls |
| Owner | The person who approves the name and intended meaning | Prevents developers and analysts from resolving ambiguity differently |
Use semantic names that can survive an interface redesign. A name tied to a temporary visual label or class name is likely to become misleading when the UI changes. If iOS calls a destination subscription_offer and Android calls the same destination paywall, your reporting will describe two concepts even when users experienced one. Resolve that difference in the contract rather than repairing it later in dashboards.
Keep the contract limited to what you can validate. If your immediate objective is screen visibility, don’t let the agent invent conversion events, parameters, or user properties to make the implementation appear more complete. Those additions require their own definitions, ownership, data review, and acceptance tests.
Use a two-pass workflow for AI-generated tracking changes

The Firebase skills can be installed in Claude Code, Codex, Cursor, and Antigravity. They give those agents guidance for platform-specific work, including iOS linker settings, Android SDK dependencies, and project configuration. That guidance is useful, but your prompt still needs to define the repository, scope, and stopping conditions.
Run the work in two passes. The first pass is inspection only. The second is a constrained implementation based on an approved plan.
- Create an isolated change. Use your normal branch and review process so the analytics work can be examined and reversed without pulling unrelated application changes with it.
- Ask for an inventory before edits. Have the agent identify the existing Firebase configuration, analytics dependencies, navigation structure, screen components, current logging calls, and platform-specific blockers.
- Compare the inventory with the contract. Confirm which screens are in scope, which are already tracked, and where two implementations could emit the same view.
- Approve the proposed file list. An SDK integration may require configuration and build changes as well as application code. Unexpected files are a reason to pause and inspect, not something to accept automatically.
- Request the smallest implementation. Limit the agent to SDK integration and the contracted screen views. Exclude refactoring, renaming, new business events, and consent-flow changes.
- Build every affected target. A change that works in one platform or build configuration is not complete when both iOS and Android are in scope.
- Review the diff before runtime testing. Look for duplicate calls, inconsistent names, unexpected dependencies, removed configuration, and analytics calls placed in code paths that run more often than a visible screen display.
A useful inspection prompt is: “Inspect this iOS and Android project without editing it. Identify the current Firebase configuration, analytics dependencies, navigation mechanism, existing screen-view logging, duplicate-tracking risks, and the files that would need to change. Compare your findings with the attached tracking contract, then return an implementation and verification plan.”
After you approve that plan, make the implementation prompt equally explicit: “Implement Google Analytics for Firebase SDK integration and screen-view logging only for the screens in the attached contract. Preserve existing consent behavior, use the canonical screen names exactly, avoid duplicate emissions, and do not add events or parameters outside the contract. Build the affected targets and report every changed file, warning, assumption, and test you could not run.”
The phrase “do not edit yet” in the first prompt is important. It separates discovery from execution and gives you a chance to catch a wrong architectural assumption before it becomes a plausible-looking patch.
Verify the data path, not just the generated code

A successful build proves that the code is acceptable to the compiler and build system. It doesn’t prove that the correct screen name is emitted, that the view appears once, or that collection respects the app’s existing controls. Verification needs three layers.
- Build correctness: the affected iOS and Android targets compile, launch, and retain the required project configuration.
- Instrumentation correctness: each contracted action produces the expected screen view, with no missing, duplicated, or unexpected views.
- Measurement correctness: the observed name and timing match the business definition in the tracking contract.
Create a short test matrix from real navigation paths. Don’t test screens as isolated components only. Lifecycle and navigation behavior are common places for duplicate or missing logging to surface.
- Launch the app and visit the initial visible screen.
- Move forward through one complete journey covered by the contract.
- Navigate backward and check whether each genuinely redisplayed screen produces the expected result.
- Leave a screen and revisit it through a different route.
- Background and foreground the app while a tracked screen is visible.
- Open a supported deep link directly to a tracked destination, if the app has deep links.
- Repeat the flow in each relevant analytics or consent state already defined by the product.
- Run the equivalent journey on iOS and Android and compare canonical names.
For every test, write down the expected sequence before running it. Then compare the observed sequence with that expectation. “Events appeared” is not an acceptance criterion. A useful result looks more like: the onboarding flow produced the three contracted screen names in the defined order, once per visible display, on both platforms.
Investigate four failure patterns before release:
- Missing views: a contracted screen never appears, often because the logging call is attached to the wrong lifecycle or navigation path.
- Duplicate views: one visible display produces more than one record, which can exaggerate engagement and distort path analysis.
- Naming drift: two names refer to the same screen, or the same name refers to different screens across platforms.
- Collection drift: the new path logs in a state where existing product rules say analytics should not run.
Don’t use campaign performance as the first validation signal. Advertising results sit downstream of implementation, data processing, audience behavior, and campaign conditions. The presence of AI-generated tracking does not establish that measurement accuracy or advertising performance improved. Validate the emitted data directly before using it to explain acquisition outcomes.
Keep AI-assisted analytics trustworthy after release
App tracking decays when the interface changes but the measurement contract does not. A screen can be renamed, split, merged, reused in another flow, or replaced while its old analytics call remains. AI can make the code update faster, but it can also reproduce an outdated assumption across several files.
Treat the contract as part of the feature definition. When a pull request adds or changes navigation, require the author to answer three questions:
- Does this change create, remove, rename, merge, or split a tracked screen?
- Does it alter when a tracked screen becomes visible or how often its lifecycle runs?
- Does the iOS-to-Android mapping still describe the same user destination?
Assign separate responsibilities even if one person fills several roles. Product or marketing owns the business question and canonical meaning. Engineering owns the placement and stability of the implementation. Analytics owns verification in the collected data. Without those decision rights, an agent will receive contradictory instructions and choose an answer that looks technically reasonable but lacks organizational authority.
Use the same narrow workflow for maintenance. Ask the agent to compare the current repository with the approved contract, report gaps, and propose a diff before making changes. Don’t assume that planned support for additional analytics tasks is already present. If you need signup, purchase, subscription, or other conversion measurement, scope it as separate work until the installed skill’s documented capability clearly covers it.
Finally, keep sensitive or free-form data out of an agent’s improvised analytics plan. Event fields should be intentionally defined and reviewed under your existing data and consent policies. Speed is valuable only when it preserves the controls that make the resulting measurement safe to use.
FAQ: What Firebase agent skills do and do not change
Do the agent skills add AI reporting inside Google Analytics?
No. They guide coding agents through analytics-related development work. They don’t add a new AI report, interpretation layer, or performance dashboard inside Google Analytics.
Can the skills implement complete conversion tracking?
Don’t assume so. The initial capability specifically covers SDK integration and screen-view logging. Additional development capabilities are planned, but a future capability should not be part of your current acceptance criteria.
Will AI-assisted implementation make app analytics more accurate?
Not automatically. It can reduce the manual work involved in making code changes, especially where iOS, Android, and project-specific configuration differ. Accuracy still depends on a sound measurement definition, correct implementation, runtime verification, and ongoing maintenance.
Start with one bounded journey and a small set of canonical screens. Give the agent an inspection-only prompt, approve the proposed change, and release only after the observed sequence matches the contract on every platform in scope. Once that loop is reliable, expand it one measurable journey at a time.
References




























