firebase-analytics
Use when logging analytics events, setting user properties, configuring default event parameters, building funnels, or adding screen-view tracking.
Install / Use
npx skills add evanca/flutter-ai-rules --skill firebase-analyticsInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of firebase-analytics
firebase-analytics scores 87/100 on our quality scale, 284th of 519 Data & Analytics skills we index.
Its SKILL.md is 5.5 KB long, well organised into 11 sections with 10 code examples: a solid amount of guidance for an agent.
It has 646 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 19 days ago, so firebase-analytics is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
firebase-analytics compared with similar skills
All 4 of these similar skills score higher than firebase-analytics; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| firebase-analytics (this skill)by evanca | 87 | 646 | 19d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install firebase-analytics?
- Run
npx skills add evanca/flutter-ai-rules --skill firebase-analytics. The install tabs above show the steps for each supported agent. - Which AI agents does firebase-analytics work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is firebase-analytics safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is firebase-analytics still maintained?
- The repository was last updated 19 days ago, so firebase-analytics is actively maintained.
Skill content
View source on GitHubname: firebase-analytics description: "Use when logging analytics events, setting user properties, configuring default event parameters, building funnels, or adding screen-view tracking." license: MIT
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 (
FirebaseAnalyticsCoreunder Swift Package Manager, orFirebaseAnalytics/Coreunder CocoaPods) instead of the defaultFirebaseAnalyticsdependency to avoid App Store review questions about advertising identifiers:- Swift Package Manager: set
FIREBASE_ANALYTICS_WITHOUT_ADID=truewhen building (FIREBASE_ANALYTICS_WITHOUT_ADID=true flutter build ios).
- Swift Package Manager: set
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
- Confirm
Firebase.initializeApp()completes before accessingFirebaseAnalytics.instance. - Run the app and check the Firebase DebugView console for incoming events.
- 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_, andga_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
-FIRDebugEnabledto scheme arguments in Xcode.
- Android:
- Test analytics implementation before deploying to production by confirming events appear in DebugView.
References
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
