1k-analytics

Log user behavior events to Mixpanel via @LogToServer() decorators.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/wanghaisheng/web3-scaffold-app-monorepo --skill 1k-analytics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 1k-analytics
Source: https://github.com/wanghaisheng/web3-scaffold-app-monorepo/tree/main/.claude/skills/1k-analytics
Command: npx skills add https://github.com/wanghaisheng/web3-scaffold-app-monorepo --skill 1k-analytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Analytics event logging across a large codebase can become inconsistent when direct analytics calls are sprinkled throughout. This Skill standardizes instrumentation by leveraging a decorator-based logger that routes events through a single analytics pipeline.

Core Features & Use Cases

  • Decorator-driven event logging with @LogToServer() to send events to the analytics server (Mixpanel).
  • Scopes and scenes structure for organized, low-friction instrumentation across modules.
  • Guidance on avoiding pitfalls like deduplication of high-frequency events and returning synchronous params, plus patterns for secure data handling.

Quick Start

Define a new event method in a scene with @LogToServer(), and invoke it via defaultLogger.{scope}.{scene}.{event} to log the event to Mixpanel.

Frequently Asked Questions about 1k-analytics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize event tracking across a large web and mobile codebase?

Standardize event tracking by applying a decorator-based logger using @LogToServer() to route user behavior events through a single analytics pipeline to Mixpanel. This enforces uniform instrumentation across multiple scopes and scenes.

What's the best way to prevent inconsistent analytics logging in my application?

Prevent inconsistent analytics logging by replacing sprinkled direct calls with a decorator-driven pattern. The @LogToServer() decorator routes events to the analytics server, providing clear guardrails and best-practice patterns for data handling.

How do I log user behavior events to Mixpanel using a decorator pattern?

Log user behavior events to Mixpanel by defining an event method in a scene with @LogToServer(), then invoking it via defaultLogger.{scope}.{scene}.{event} to send the tracked data synchronously to the analytics server.

Can I use decorator-driven analytics for high-frequency events in mobile apps?

Yes, you can use decorator-driven analytics for high-frequency events in mobile apps. The approach includes specific guidance on avoiding common pitfalls like event deduplication and ensuring methods return synchronous params for reliable tracking.

What are the limitations of using a decorator-based logger for event tracking?

A limitation of using a decorator-based logger is that event methods must return data synchronously. Additionally, developers must handle secure data routing and manage deduplication of high-frequency events manually to avoid tracking bloat.

Does 1k-analytics require external dependencies to route events to the analytics server?

No, 1k-analytics operates without external dependencies. It uses an internal decorator-based logger and scopes structure to route events directly to Mixpanel via the integrated analytics service.