firebase-analytics
Integrates Firebase Analytics into Flutter apps. Use when setting up analytics, logging events, setting user properties, or configuring event parameters.
Best use case
firebase-analytics is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Integrates Firebase Analytics into Flutter apps. Use when setting up analytics, logging events, setting user properties, or configuring event parameters.
Integrates Firebase Analytics into Flutter apps. Use when setting up analytics, logging events, setting user properties, or configuring event parameters.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "firebase-analytics" skill to help with this workflow task. Context: Integrates Firebase Analytics into Flutter apps. Use when setting up analytics, logging events, setting user properties, or configuring event parameters.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/firebase-analytics/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How firebase-analytics Compares
| Feature / Agent | firebase-analytics | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Integrates Firebase Analytics into Flutter apps. Use when setting up analytics, logging events, setting user properties, or configuring event parameters.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Firebase Analytics Skill
This skill defines how to correctly use Firebase Analytics in Flutter applications.
## When to Use
Use this skill when:
* Setting up and configuring Firebase Analytics in a Flutter project.
* Logging predefined or custom events.
* Setting user properties or default event parameters.
* Applying best practices for analytics data collection.
---
## 1. Setup and Configuration
```
flutter pub add firebase_analytics
flutter run
```
```dart
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.
---
## 2. Event Logging
Use **predefined event methods** when possible for maximum detail in reports and access to future Google Analytics features:
```dart
await FirebaseAnalytics.instance.logSelectContent(
contentType: "image",
itemId: itemId,
);
```
Use the general `logEvent()` method for both predefined and custom events:
```dart
await FirebaseAnalytics.instance.logEvent(
name: "select_content",
parameters: {
"content_type": "image",
"item_id": itemId,
},
);
```
Custom events:
```dart
await FirebaseAnalytics.instance.logEvent(
name: "share_image",
parameters: {
"image_name": name,
"full_text": text,
},
);
```
- Event names are **case-sensitive** — names differing only in case create two distinct events.
- You can log up to **500 different event types** with no limit on total event volume.
---
## 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.
- Use custom parameters for non-numerical data (dimensions) or numerical data (metrics); register them in the Analytics console first.
Set default parameters for all future events (not supported on web):
```dart
await FirebaseAnalytics.instance.setDefaultEventParameters({
'version': '1.2.3',
});
```
Clear a default parameter by setting it to `null`.
---
## 4. User Properties
```dart
await FirebaseAnalytics.instance.setUserProperty(
name: 'favorite_food',
value: favoriteFood,
);
```
- Create custom definitions for user properties in the Analytics console before using them.
- Use user properties for custom definitions, report comparisons, or audience criteria.
---
## 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** for custom events and parameters.
- Group related events to track user flows and conversion funnels.
- **Test** your analytics implementation before deploying to production.
---
## References
- [FlutterFire GitHub Repository](https://github.com/firebase/flutterfire)Related Skills
firebase-storage
Integrates Firebase Cloud Storage into Flutter apps. Use when setting up Storage, uploading or downloading files, managing metadata, handling errors, or applying security rules.
firebase-remote-config
Integrates Firebase Remote Config into Flutter apps. Use when setting up Remote Config, managing parameter defaults, fetching and activating values, implementing real-time updates, or handling throttling and testing.
firebase-messaging
Integrates Firebase Cloud Messaging (FCM) into Flutter apps. Use when setting up push notifications, handling foreground/background messages, managing permissions, working with FCM tokens, or configuring platform-specific notification behavior.
firebase-in-app-messaging
Integrates Firebase In-App Messaging into Flutter apps. Use when setting up in-app messaging, triggering or suppressing messages, managing user privacy and opt-in data collection, or testing campaigns.
firebase-database
Integrates Firebase Realtime Database into Flutter apps. Use when setting up Realtime Database, structuring JSON data, querying, performing read/write operations, implementing offline capabilities, or applying security rules.
firebase-data-connect
Integrates Firebase Data Connect into Flutter apps. Use when setting up Data Connect, designing queries, handling errors, or applying security and performance best practices.
firebase-crashlytics
Integrates Firebase Crashlytics into Flutter apps. Use when setting up crash reporting, handling fatal and non-fatal errors, customizing crash reports with keys/logs/user identifiers, or configuring opt-in reporting.
firebase-cloud-functions
Calls Firebase Cloud Functions from Flutter apps. Use when setting up callable functions, passing data to functions, handling errors from function calls, optimizing performance, or testing with the Firebase Emulator Suite.
firebase-cloud-firestore
Integrates Cloud Firestore into Flutter apps. Use when setting up Firestore, designing document/collection structure, reading and writing data, working with real-time listeners, designing for scale, or applying security rules.
firebase-auth
Integrates Firebase Authentication into Flutter apps. Use when setting up auth, managing auth state, implementing email/password or social sign-in, handling auth errors, managing users, or applying security best practices.
firebase-app-check
Integrates Firebase App Check into Flutter apps. Use when setting up App Check, selecting providers per platform, using debug providers during development, enabling enforcement, or applying App Check security best practices.
firebase-ai
Integrates Firebase AI Logic into Flutter apps. Use when setting up the firebase_ai plugin, calling Gemini models, handling AI service errors, or applying security and privacy considerations for AI features.