setup-analytics
Enable Firebase Analytics, Crashlytics, and Remote Config feature flags in the KMP app — log events, add a flag, toggle it at runtime via Remote Config, and…
Skill by KotlinFoundation
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/kotlinfoundation-setup-analytics
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/setup-analytics
What's inside
- Skill name
setup-analytics- Description
- Enable Firebase Analytics, Crashlytics, and Remote Config feature flags in the KMP app — log events, add a flag, toggle it at runtime via Remote Config, and verify events in DebugView. Use when the developer wants analytics, crash reporting, or remote feature flags. Firebase must already be set up (integrations phase).
- License
- MIT
- Instructions
- 75 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Set up analytics, Crashlytics & feature flags
All three ride on the **same Firebase project** wired in the `integrations` phase (Analytics,
Crashlytics, and Remote Config are Firebase features — no new project). Enable each in the console,
then use the app's existing abstractions.
## 1. Enable in the Firebase Console
Open https://console.firebase.google.com/ → your project:
- **Analytics** — the Analytics dashboard (enabled with the project); confirm the Android/iOS apps
report.
- **Crashlytics** — **Run & monitor → Crashlytics → Enable Crashlytics** (a first crash/report must
arrive before the dashboard populates).
- **Remote Config** — **Run & monitor → Remote Config**; you'll add parameters in step 3.
## 2. Log analytics events
Events go through the `Analytics` interface — Firebase Analytics on mobile, no-op elsewhere:
`shared/src/commonMain/kotlin/com/kotlinfoundation/koko/util/analytics/Analytics.kt`.
- `analytics.logEvent(event, params)` — custom event.
- `analytics.logScreenView(screenName)` — the common screen-view event.
Define new event/param names as constants in the `Analytics` companion (e.g. `EVENT_SCREEN_VIEW`,
`EVENT_CLICKED_GENERATE`) rather than raw strings. Inject `Analytics` via Koin and log at your funnel
points (screen entry, key conversions). Analytics is gated by the `IS_ANALYTICS_ENABLED` flag in
`AppInitializer.initializeAnalytics()`.
## 3. Feature flags via Remote Config
Flags are read through `FeatureFlagManager`
(`shared/src/commonMain/kotlin/com/kotlinfoundation/koko/data/source/featureflag/FeatureFlagManager.kt`),
backed by Firebase Remote Config on Android/iOS and a no-op elsewhere. `AppInitializer` calls
`syncsFlagsAsync()` on startup; values fall back to `DEFAULT_VALUES` until fresh ones fetch.
**Add a flag** in `FeatureFlagManager`:
```kotlin
object Keys {
const val IS_ADS_ENABLED = "is_ads_enabled"
const val IS_ANALYTICS_ENABLED = "is_analytics_enabled"
const val SHOW_REMOTE_PAYWALL = "show_remote_paywall"
const val MY_NEW_FLAG = "my_new_flag" // <- add
}
val DEFAULT_VALUES: Map<String, Comparable<Nothing>> = mapOf(
Keys.IS_ADS_ENABLED to false,
Keys.IS_ANALYTICS_ENABLED to true,
Keys.SHOW_REMOTE_PAYWALL to false,
Keys.MY_NEW_FLAG to false, // <- default until Remote Config fetches
)
```
**Read it:** `featureFlagManager.getBoolean(FeatureFlagManager.Keys.MY_NEW_FLAG)` (also
`getString` / `getLong` / `getDouble`).
**Toggle it at runtime:** in the Firebase Console → **Remote Config**, **Add parameter** with the
same key string (`my_new_flag`), set the value, and **Publish changes**. The next `syncsFlagsAsync()`
(app start) picks it up — no app release needed. Publishing lets you enable/disable a feature or roll
it out to a subset of users without shipping.
## 4. Verify in DebugView
Firebase **DebugView** shows events in near-real-time from a debug-enabled device:
- Android: `adb shell setprop debug.firebase.analytics.app <applicationId>`
- Then open **Firebase Console → Analytics → DebugView** and drive the app.
Use `AppLogger`
(the facade declared in `shared/src/commonMain/kotlin/com/kotlinfoundation/koko/util/logging/Logger.kt`
alongside the `Logger` interface it fans out to, initialized in `AppInitializer`) for local
`AppLogger.d(...)` traces alongside DebugView while confirming events fire.
## Done
An event appears in DebugView and a Remote Config parameter change flips your flag on next launch.
This is the `setup-analytics` step of the `growth` phase.From KotlinFoundation/kmp-contest-starter-kit, MIT.
More from KotlinFoundation/kmp-contest-starter-kit
- 0.609score
add-api-service
KotlinFoundation
Add a Ktor-backed network request end-to-end — request/response DTOs, an API service, a repository, and a ViewModel call.
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
capture-app-screens
KotlinFoundation
Render the app's own screens to plain PNGs at storefront pixel sizes (1284×2778 etc.) from @Preview @StoreScreenshot composables — the real UI and nothing…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
add-permission
KotlinFoundation
Request a runtime permission (notifications, camera, gallery out of the box; location, microphone or any other after adding its Calf module) via the app-level…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
getting-started
KotlinFoundation
Phase-1 blueprint for the KMP starter kit — get the app running locally on your own device, rebrand it, and build your MVP features from the PRD (all…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
publish-release
KotlinFoundation
Build the signed release artifacts and ship them — Android AAB to a Play track and iOS archive to TestFlight/App Store, via Fastlane lanes or the tag-driven…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
refactor-package
KotlinFoundation
Rename the app's package / applicationId / iOS bundle ID and display name across the whole project.
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
run-quality-gates
KotlinFoundation
Run the same lint, test, screenshot, and build checks as CI.
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
configure-environment
KotlinFoundation
Reference catalog (a lookup, not a setup action) of every environment configuration value — local.properties API keys, the gradle.properties subscription…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
setup-appstore-connect
KotlinFoundation
Manually create and configure the app in App Store Connect — bundle id, version, categories, age rating, privacy, review info, and localized metadata.
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
setup-subscriptions
KotlinFoundation
Wire up in-app subscriptions in KMPStarterKit — pick the provider (Adapty default or RevenueCat) via one gradle property, add the two SDK keys, create store…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
sync-data-firebase
KotlinFoundation
Sync app data to Firebase — Firestore documents, cross-device sync, server-authoritative state (credit balances, settings, user profiles, saved items).
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
koko-mobileapp-getting-started
KotlinFoundation
Phase 1 developer journey guide for the MobileApp directory.
SkillBFreshness: B★ 28Claude Code +9
Signals
- Stars
- 28
- Forks
- 13
- Open issues
- 1
- Last commit (this folder)
- Aug 10, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from KotlinFoundation
- 0.609score
add-permission
KotlinFoundation
Request a runtime permission (notifications, camera, gallery out of the box; location, microphone or any other after adding its Calf module) via the app-level…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
capture-app-screens
KotlinFoundation
Render the app's own screens to plain PNGs at storefront pixel sizes (1284×2778 etc.) from @Preview @StoreScreenshot composables — the real UI and nothing…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
configure-environment
KotlinFoundation
Reference catalog (a lookup, not a setup action) of every environment configuration value — local.properties API keys, the gradle.properties subscription…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
getting-started
KotlinFoundation
Phase-1 blueprint for the KMP starter kit — get the app running locally on your own device, rebrand it, and build your MVP features from the PRD (all…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
publish-release
KotlinFoundation
Build the signed release artifacts and ship them — Android AAB to a Play track and iOS archive to TestFlight/App Store, via Fastlane lanes or the tag-driven…
SkillBFreshness: B★ 28Claude Code +9 - 0.609score
add-api-service
KotlinFoundation
Add a Ktor-backed network request end-to-end — request/response DTOs, an API service, a repository, and a ViewModel call.
SkillBFreshness: B★ 28Claude Code +9
Cite this page
setup-analytics skill. Agent Mart. https://agentmart.dev/skills/kotlinfoundation-setup-analytics (last updated 2026-10-24)