AN

Analytics framework for Unity capturing player events and spatial telemetry.

Install

mkdir -p .claude/skills/analytics-heatmaps && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16673" && unzip -o skill.zip -d .claude/skills/analytics-heatmaps && rm skill.zip

Installs to .claude/skills/analytics-heatmaps

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Implementation of comprehensive analytics tracking and heatmap data collection for player behavior analysis.
108 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Track player behavior events
  • Collect spatial data for heatmaps
  • Measure retention (Day 1, Day 7)
  • Balance game difficulty (win/loss rates)
  • Find level design flaws (spatial heatmaps)
  • Track monetization conversion

How it works

This skill provides an analytics pipeline for tracking player behavior events and spatial data, supporting multiple providers via an interface abstraction.

Inputs & outputs

You give it
Player behavior events (e.g., LevelComplete, player_death_location)
You get back
Tracked analytics data and heatmap data

When to use analytics-heatmaps

  • Measure player retention
  • Track level completion events
  • Generate death position heatmaps
  • Debug player funnels

About this skill

Analytics & Heatmaps

Overview

System for tracking player behavior events and spatial data (heatmaps). Supports multiple providers (Unity Analytics, Firebase, Mixpanel) via an interface abstraction.

When to Use

  • Use for measuring retention (Day 1, Day 7)
  • Use for balancing game difficulty (win/loss rates)
  • Use for finding level design flaws (spatial heatmaps)
  • Use for tracking monetization conversion
  • Use for debugging user flows (funnels)

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    ANALYTICS PIPELINE                       │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  GAMEPLAY CODE                                              │
│  ┌──────────────────────┐                                   │
│  │ "LevelComplete"      │                                   │
│  │ Params: {Score: 100} │                                   │
│  └──────────┬───────────┘                                   │
│             │                                               │
│             ▼                                               │
│  ANALYTICS MANAGER (Interface)                              │
│  ┌──────────┬───────────┬───────────┐                       │
│  │ Provider │ Provider  │ Heatmap   │                       │
│  │ (Unity)  │ (Google)  │ Recorder  │                       │
│  └──────────┴───────────┴─────┬─────┘                       │
│                               │                             │
│                               ▼                             │
│                         ┌───────────┐                       │
│                         │ LOCAL LOG │ (Dev builds)          │
│                         └───────────┘                       │
│                                                             │
└─────────────────────────────────────────────────────────────┘

tracked Event Structure

Event NameParametersGoal
game_startversion, platformDaily Active Users (DAU)
level_startlevel_id, difficultyEngagement
level_completelevel_id, time, scoreProgression
process_faillevel_id, reasonChurn analysis
iap_transactionproduct_id, priceRevenue

Best Practices

  • ✅ Wrap external SDKs (don't call Firebase directly)
  • ✅ Use standardized event naming (noun_verb or snake_case)
  • ✅ Track "First Time User Experience" (FTUE) rigidly
  • ✅ Record screen resolution and device specs
  • ✅ Batch events to save battery
  • NEVER track Personally Identifiable Information (PII) without consent
  • NEVER track high-frequency events (e.g., Update loop)
  • NEVER rely on client-side timestamps (use server time)

Few-Shot Examples

Example 1: Analytics Service

User: "Track level completion."

Agent:

public class AnalyticsService : MonoBehaviour
{
    public void TrackLevelComplete(string levelId, int score, float duration)
    {
        var params = new Dictionary<string, object>
        {
            { "level_id", levelId },
            { "score", score },
            { "duration_seconds", duration },
            { "user_level", _player.Level }
        };
        
        SendEvent("level_complete", params);
    }
    
    private void SendEvent(string name, Dictionary<string, object> parameters)
    {
        // Wrapper for SDKs
        Unity.Services.Analytics.AnalyticsService.Instance.CustomData(name, parameters);
        Debug.Log($"[Analytics] {name}: {JsonConvert.SerializeObject(parameters)}");
    }
}

Example 2: Heatmap Recorder

User: "Record where players die."

Agent:

public class HeatmapRecorder : MonoBehaviour
{
    public void RecordDeath(Vector3 position)
    {
        // Round to grid to save data density
        int x = Mathf.RoundToInt(position.x);
        int z = Mathf.RoundToInt(position.z);
        
        var data = new Dictionary<string, object>
        {
            { "pos_x", x },
            { "pos_z", z },
            { "level", SceneManager.GetActiveScene().name }
        };
        
        AnalyticsService.Instance.TrackEvent("player_death_location", data);
    }
}

Example 3: Funnel Tracking

User: "Track tutorial steps."

Agent:

public void TrackTutorialStep(int stepIndex, string stepName)
{
    AnalyticsService.Instance.TrackEvent("tutorial_step", new() {
        { "step_index", stepIndex },
        { "step_name", stepName },
        { "time_since_start", Time.timeSinceLevelLoad }
    });
}

TDD Contract

⚠️ Legacy Skill — Refactor Pending Este skill NO tiene tests automatizados aún. El siguiente boilerplate es un punto de partida.

// Escribe estos tests ANTES de implementar:

// Test 1: should [expected behavior] when [condition]
[Test]
public void AnalyticsHeatmaps_Should{ExpectedBehavior}_When{Condition}()
{{
    // Arrange
    // TODO: Setup test fixtures
    
    // Act
    // TODO: Execute system under test
    
    // Assert
    Assert.Fail("Not implemented — write test first");
}}

// Test 2: should handle [edge case]
[Test]
public void AnalyticsHeatmaps_ShouldHandle{EdgeCase}()
{{
    // Arrange
    // TODO: Setup edge case scenario
    
    // Act
    // TODO: Execute
    
    // Assert
    Assert.Fail("Not implemented");
}}

// Test 3: should throw when [invalid input]
[Test]
public void AnalyticsHeatmaps_ShouldThrow_When{InvalidInput}()
{{
    // Arrange
    var invalidInput = default;
    
    // Act & Assert
    Assert.Throws<Exception>(() => {{ /* execute */ }});
}}

Pasos para completar el TDD:

  1. Descomenta los tests above
  2. Implementa la funcionalidad mínima para que compile
  3. Ejecuta los tests — deben fallar (RED)
  4. Implementa la funcionalidad real
  5. Verifica que los tests pasen (GREEN)
  6. Refactorea manteniendo los tests verdes

Nota: Este skill fue marcado como tdd_first: false durante la auditoría v2.0.1. La sección TDD fue agregada automáticamente pero requiere customización manual para reflejar el comportamiento real del skill.

Related Skills

  • @backend-integration - Store analytics remotely
  • @monetization-iap - Track purchases
  • @mobile-optimization - Battery-safe tracking

When not to use it

  • When tracking Personally Identifiable Information (PII) without consent
  • When tracking high-frequency events (e.g., Update loop)
  • When relying on client-side timestamps instead of server time

Prerequisites

Unity version >=6.0

Limitations

  • Does not track PII without consent
  • Does not track high-frequency events
  • Does not rely on client-side timestamps

How it compares

This skill offers a structured analytics and heatmap system for Unity games, abstracting provider SDKs and enforcing best practices for event tracking, unlike direct SDK integration.

Compared to similar skills

analytics-heatmaps side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
analytics-heatmaps (this skill)05moReviewIntermediate
test-reporting-analytics12moReviewIntermediate
omnidocbench-eval-helper03moReviewAdvanced
backtesting-trading-strategies101moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

test-reporting-analytics

proffesor-for-testing

Advanced test reporting, quality dashboards, predictive analytics, trend analysis, and executive reporting for QE metrics. Use when communicating quality status, tracking trends, or making data-driven decisions.

12

omnidocbench-eval-helper

opendatalab

Help users deploy, validate, run, and parse OmniDocBench evaluations. Use this skill whenever the user mentions OmniDocBench, document parsing/OCR benchmark scoring, MinerU or other model evaluation on OmniDocBench, CDM formula metrics, end2end/md2md configs, Docker/conda deployment, remote SSH/H-cl

00

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

model-usage

openclaw

Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.

548

analytics-tracking

davila7

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," or "tracking plan." For A/B test measurement, see ab-test-setup.

736

splunk-analysis

incidentfox

Splunk log analysis using SPL (Search Processing Language). Use when investigating issues via Splunk logs, saved searches, or alerts.

536

Search skills

Search the agent skills registry