Source profileQuality 84/100

evanca/flutter-ai-rules/skills/firebase-analytics/SKILL.md

firebase-analytics

Use when logging analytics events, setting user properties, configuring default event parameters, building funnels, or adding screen-view tracking.

Source repository stars
604
Declared platforms
0
Static risk flags
0
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

This skill defines how to correctly implement Firebase Analytics in Flutter applications, covering setup, event logging, user properties, and data collection best practices.

Best for

  • Setting up and configuring Firebase Analytics in a Flutter project.
  • Logging predefined or custom analytics events.
  • Setting user properties or default event parameters.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/evanca/flutter-ai-rules --skill "skills/firebase-analytics"
Safe inspection promptEditorial

Inspect the Agent Skill "firebase-analytics" from https://github.com/evanca/flutter-ai-rules/blob/b294a77b68b5508f8d3151fb93d87ed9622d2ff1/skills/firebase-analytics/SKILL.md at commit b294a77b68b5508f8d3151fb93d87ed9622d2ff1. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    1. Setup and Configuration

    For GoRouter, log screen views manually on route changes:

    Initialize Firebase before using any Firebase Analytics features.Analytics automatically logs some events and user properties — no additional code needed for those.On iOS, if your app does not use the IDFA (Advertising Identifier), use the IDFA-free Analytics dependency (FirebaseAnalyticsCore under Swift Package Manager, or FirebaseAnalytics/Core under CocoaPods) instead of the de…
  2. 02

    Verification Checklist

    1. Confirm Firebase.initializeApp() completes before accessing FirebaseAnalytics.instance. 2. Run the app and check the Firebase DebugView console for incoming events. 3. Confirm automatic events (firstopen, sessionstart) appear without extra code.

    Confirm Firebase.initializeApp() completes before accessing FirebaseAnalytics.instance.Run the app and check the Firebase DebugView console for incoming events.Confirm automatic events (firstopen, sessionstart) appear without extra code.
  3. 03

    When to Use

    Setting up and configuring Firebase Analytics in a Flutter project. Logging predefined or custom analytics events. Setting user properties or default event parameters. Implementing screen view tracking with GoRouter or Navigator observers. Building conversion funnels or tracking…

    Setting up and configuring Firebase Analytics in a Flutter project.Logging predefined or custom analytics events.Setting user properties or default event parameters.
  4. 04

    Add Navigator Observer for Automatic Screen Tracking

    For GoRouter, log screen views manually on route changes:

    For GoRouter, log screen views manually on route changes:
  5. 05

    2. Event Logging

    Use predefined event methods when possible for maximum detail in reports and access to future Google Analytics features:

    Event names are case-sensitive — names differing only in case create two distinct events.Up to 500 different event types with no limit on total event volume.Event names must start with an alphabetic character, contain only alphanumeric characters and underscores, and be no longer than 40 characters.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score84/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars604SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
evanca/flutter-ai-rules
Skill path
skills/firebase-analytics/SKILL.md
Commit
b294a77b68b5508f8d3151fb93d87ed9622d2ff1
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Firebase Analytics Skill

This skill defines how to correctly implement Firebase Analytics in Flutter applications, covering setup, event logging, user properties, and data collection best practices.

When to Use

Use this skill when:

  • Setting up and configuring Firebase Analytics in a Flutter project.
  • Logging predefined or custom analytics events.
  • Setting user properties or default event parameters.
  • Implementing screen view tracking with GoRouter or Navigator observers.
  • Building conversion funnels or tracking user flows.

1. Setup and Configuration

flutter pub add firebase_analytics
flutter run
import 'package:firebase_analytics/firebase_analytics.dart';

// After Firebase.initializeApp():
FirebaseAnalytics analytics = FirebaseAnalytics.instance;
  • Initialize Firebase before using any Firebase Analytics features.
  • Analytics automatically logs some events and user properties — no additional code needed for those.
  • On iOS, if your app does not use the IDFA (Advertising Identifier), use the IDFA-free Analytics dependency (FirebaseAnalyticsCore under Swift Package Manager, or FirebaseAnalytics/Core under CocoaPods) instead of the default FirebaseAnalytics dependency to avoid App Store review questions about advertising identifiers:
    • Swift Package Manager: set FIREBASE_ANALYTICS_WITHOUT_ADID=true when building (FIREBASE_ANALYTICS_WITHOUT_ADID=true flutter build ios).

Add Navigator Observer for Automatic Screen Tracking

MaterialApp(
  navigatorObservers: [
    FirebaseAnalyticsObserver(analytics: FirebaseAnalytics.instance),
  ],
);

For GoRouter, log screen views manually on route changes:

GoRouter(
  observers: [FirebaseAnalyticsObserver(analytics: FirebaseAnalytics.instance)],
);

Verification Checklist

  1. Confirm Firebase.initializeApp() completes before accessing FirebaseAnalytics.instance.
  2. Run the app and check the Firebase DebugView console for incoming events.
  3. Confirm automatic events (first_open, session_start) appear without extra code.

2. Event Logging

Use predefined event methods when possible for maximum detail in reports and access to future Google Analytics features:

await FirebaseAnalytics.instance.logSelectContent(
  contentType: "image",
  itemId: itemId,
);

Use the general logEvent() method for both predefined and custom events:

await FirebaseAnalytics.instance.logEvent(
  name: "select_content",
  parameters: {
    "content_type": "image",
    "item_id": itemId,
  },
);

Custom Event Example — E-commerce Add-to-Cart

Future<void> logAddToCart(String productId, String productName, double price) async {
  await FirebaseAnalytics.instance.logEvent(
    name: 'add_to_cart',
    parameters: {
      'product_id': productId,
      'product_name': productName,
      'price': price,
      'currency': 'USD',
    },
  );
}
  • Event names are case-sensitive — names differing only in case create two distinct events.
  • Up to 500 different event types with no limit on total event volume.
  • Event names must start with an alphabetic character, contain only alphanumeric characters and underscores, and be no longer than 40 characters.

3. Parameters and Properties

  • Parameter names: up to 40 characters, must start with an alphabetic character, contain only alphanumeric characters and underscores.
  • String parameter values: up to 100 characters.
  • The prefixes firebase_, google_, and ga_ are reserved — do not use them for parameter names.
  • Up to 25 custom parameters per event.
  • Register custom parameters in the Analytics console to use them as dimensions or metrics in reports.

Set default parameters for all future events (not supported on web):

await FirebaseAnalytics.instance.setDefaultEventParameters({
  'app_version': '1.2.3',
  'environment': 'production',
});

Clear a default parameter by setting it to null.


4. User Properties

await FirebaseAnalytics.instance.setUserProperty(
  name: 'favorite_food',
  value: favoriteFood,
);

Set the user ID to correlate events across devices:

await FirebaseAnalytics.instance.setUserId(id: 'user_12345');
  • Create custom definitions for user properties in the Analytics console before using them.
  • Up to 25 custom user properties per project.
  • Use user properties for audience segmentation, report filtering, or A/B test targeting.

5. Best Practices

  • Request necessary permissions before collecting user data, especially on platforms with strict privacy controls.
  • Never log sensitive or personally identifiable information in events or user properties.
  • Use consistent naming conventions (snake_case) for custom events and parameters.
  • Group related events to track user flows and conversion funnels.
  • Use DebugView in the Firebase console during development — enable it on a physical device with:
    • Android: adb shell setprop debug.firebase.analytics.app <package_name>
    • iOS: Add -FIRDebugEnabled to scheme arguments in Xcode.
  • Test analytics implementation before deploying to production by confirming events appear in DebugView.

References

Alternatives

Compare before choosing

Computed 100165

JasonColapietro/suede-creator-skills

suede-ab-testing

Suede-owned experimentation discipline for hypotheses, sample sizing, test duration, significance, and repeatable experiment programs. Use when comparing variants, deciding whether a result is reliable, or building an experiment backlog and cadence. NOT FOR: analytics instrumentation (use suede-analytics), post-click conversion diagnosis (use suede-site-alchemy), or writing the variant copy itself (use suede-copy).

Computed 1007

narrative-io/narrative-skills-marketplace

design-analysis

Translate a fuzzy analytical question into a rigorous investigation plan. Interrogates the ask, grounds the plan in the available data dictionary, applies analytical best practices, and produces a structured brief of query specifications for a downstream query-writing skill. Plans, does not write SQL. Use when: "why did X drop", "is there a relationship between A and B", "who are our highest-value customers", "what's driving the change in Y", "investigate this trend", "design an analysis for", "

Computed 9832,606

K-Dense-AI/scientific-agent-skills

dask

Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.

Computed 9832,606

K-Dense-AI/scientific-agent-skills

imaging-data-commons

Query and download public cancer imaging data from NCI Imaging Data Commons using idc-index. Use for accessing large-scale radiology (CT, MR, PET) and pathology datasets for AI training or research. No authentication required. Query by metadata, visualize in browser, check licenses.