Metrics tagging

From ommakes/Skills · View interactive version

Metrics tagging is an AI agent skill from the GitHub repository ommakes/Skills. Analyze UI mockups, screenshots, or prototype frames to identify all trackable interactions and generate a complete analytics event taxonomy table, including multi-step task/flow completion events. Use this skill whenever a designer uploads a screen, mockup, prototype screenshot, or UI frame and wan

How to use this skill

Skill file

Metrics Tagging Skill

Analyze a UI mockup or screenshot and produce a complete analytics event taxonomy, ready for handoff to a tag implementation team.

Mental Model: Three Levels of Tagging

Before generating the table, always frame the output across three levels. This helps designers understand why each tag matters — not just what it is.

| Level | What it answers | Example |

|-------|----------------|---------|

| Page | What happened on screen | User clicked "Save" button |

| App | What workflow is this part of | Account setup flow completion |

| Business | Which KPI does this feed | Task completion rate, time-on-task, abandonment rate |

Input

Accept any of:

The designer may also provide:

If the designer does not provide product or flow context, ask for it before generating the table. The "Purpose" column cannot be filled accurately without knowing what the flow is trying to accomplish.

Naming Convention

Use camelCase. Follow this pattern: noun + Verb

Format: [object/screen][Action]

General examples:

Rules:

Output: Event Taxonomy Table

Produce a markdown table with exactly these six columns:

| # | Event or Action | ID or Variable | Definition | Properties | Purpose | Event Name |

|---|----------------|----------------|------------|------------|---------|------------|

Column definitions:

Event or Action — Plain English label. What the user did or what happened. Use the element type + label text. Examples:

ID or Variable — The DOM-level selector or variable name the tag team will hook into. Use kebab-case. Infer from the label text if not visible in the mockup. Examples:

Definition — When exactly does this event fire? Be precise. Start with "When the user..." or "The moment the page..."

Properties — The contextual data that rides along on the event payload, not the event name itself. This is where variation belongs — do NOT create a separate event for every possible value. Examples:

If a field has no meaningful downstream property (e.g. a static page load), write "—".

Never put PII in a property — no email, name, phone, or address. Reference a user/account ID instead and let the backend join it if needed.

Purpose — Which business question does tracking this answer? Connect to a KPI. If flow context was provided, map directly to a stated KPI. If not, use the most likely KPI for that element type:

Event Name — camelCase event name following the naming convention above.

Cascading Input Priority

Not all inputs are equal. When deciding whether to tag a specific input field, apply these two tests. If either passes, the input must be tagged and flagged.

Test 1 — Does it cascade?

If changing this field's value causes anything else in the flow to change — other fields appearing or hiding, validation rules shifting, downstream behavior changing — it must be tagged. These inputs explain why users take different paths through the same flow.

Test 2 — Does it have sizeable outcome impact?

Even if nothing visually changes, does this field's value directly affect the product's core outcome — pricing, eligibility, access level, subscription tier, risk calculation, permissions? If yes, tag it.

General examples of must-tag inputs:

General examples of lower-priority inputs:

When analyzing a mockup, mark each cascading or high-impact input with a [CASCADE] or [HIGH IMPACT] flag in the Purpose column. This tells the tag team what to prioritize if they need to phase implementation.

If cascade behavior of any input is unclear from the mockup, flag it in the Coverage Gaps section and prompt the designer to verify with a PM or business analyst before handoff.

Element Coverage Checklist

When analyzing a screen, systematically check for all of these. Do not skip any category.

Always tag:

Tag if present and notable:

Flag but do not generate — prompt the designer:

Task-Level Events (Flow Completion)

Individual click events tell you what happened at one moment. They don't tell you whether the user actually finished what they set out to do. That requires a second, higher-level layer: pairing a start event with an end event to measure completion of a whole task, not just a single interaction.

When to generate this table: any time the screen (or set of screens) contains a create/edit/delete/setup pattern where a user initiates an action and completes it one or more steps later — e.g. personaCreateBtnClicked (start) → personaSaveBtnClicked (end) = "Add New Persona" task. If the flow spans multiple screens and only one has been shared, generate the table with the available half and flag the missing screen in Coverage Gaps.

How linking actually works: analytics tools (Amplitude, Mixpanel, GA4) don't have a native "paired event" object. They stitch a start and end event together via a shared property fired on both — typically a flow_id (a UUID generated the moment the start event fires, attached to every event in that task until it ends). Always specify this linking property; without it, "task completion rate" isn't computable, just a hopeful correlation.

Produce a second markdown table:

| Task Name | Start Event | End Event | Linking Property | Success Definition | Abandonment Rule | Purpose |

|-----------|-------------|-----------|-------------------|---------------------|-------------------|---------|

Edge cases to flag, not silently resolve:

Avoiding Taxonomy Bloat

More events isn't better tracking — it's noise that makes funnels unreadable. Before finalizing:

Cross-Session Consistency (Event Registry)

Every run of this skill invents event names and selector IDs fresh, with no memory of what got named last time. Left unchecked, that's how the same "Save" button pattern ends up as saveBtn on one screen and saveChangesBtn on another a few weeks later — the exact naming-drift problem the Quality Check dedup rule above is trying to catch within a single run, extended across runs.

Fix: maintain a running ledger at references/event-registry.md (in the same repo/workspace as this skill, not bundled with it — it's project-specific, not skill-specific).

Before tagging a new screen:

  1. Read references/event-registry.md if it exists.
  2. Check whether any element on the new screen matches (or closely resembles) an already-registered pattern — same interaction type, same rough purpose. If so, reuse its Event Name and ID convention exactly, even if your first instinct would've named it slightly differently.
  3. If the file doesn't exist yet, this is the first run for this project — proceed normally and create it at the end.

After finalizing output:

Append one row per new event (skip ones reused from the registry) to a table with this shape:

| Event Name | ID or Variable | Screen/Flow | Date Added |

|------------|-----------------|-------------|------------|

Don't rewrite history — only add rows for genuinely new events. If naming conventions in the registry conflict with this skill's default pattern (e.g. the project already uses snake_case), follow the registry, not the skill defaults, and note that in the Naming Convention Reference block.

Coverage Gap Section

After the table, always output a Coverage Gaps section:

The following were NOT visible in the provided mockup or could not be

determined from it. Verify these before handoff:

Error state: What fires if form validation fails?

Loading state: Is there a spinner or skeleton? Should it be tracked?

Empty state: What fires if the list/section is empty on load?

[Any cascading inputs flagged as unclear]

[Any conditional logic that depends on user state or permissions]

## Business Context Priming

If the designer provides flow context, use it to sharpen the Purpose column.

Common KPIs by product type to map to:

SaaS / internal tools:

E-commerce:

Consumer apps:

If no context is provided, use generic KPI language and note in the output that Purpose column accuracy will improve with flow context.

Output Format

  1. Start with a brief Screen Summary (1-2 sentences: what screen is this, what flow is it part of)
  2. Output the Event Taxonomy Table in full
  3. Output the Task-Level Events table if the screen contains any multi-step create/edit/delete pattern (omit this step entirely if none exist — don't force it)
  4. Output the Coverage Gaps section
  5. End with a Naming Convention Reference block showing the pattern used and any conventions observed or inferred

Example Output Structure

Quality Check Before Outputting

Before finalizing output, verify:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.