Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Analytics Contract GeneratorNew to Visual Studio Code? Get it now.
Analytics Contract Generator

Analytics Contract Generator

Livinton Collado

|
4 installs
| (0) | Free
Generate structured analytics contracts (JSDoc) for event adapter functions with variant detection and governance metadata.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Analytics Contract Generator

Generate structured analytics contracts (JSDoc) directly from event adapter functions.

Why

In tracking architectures, event payloads often evolve without formal contracts. This extension helps teams keep analytics documentation consistent and close to the source code—where changes actually happen.

What it does

  • Detects adapter-style functions and switch-based variants
  • Extracts event names (when payload contains an event field)
  • Infers parameter types: number, string, boolean, Object, any
  • Captures guard clauses (early returns / safety checks)
  • Detects data-layer push calls (generic)
  • Generates structured JSDoc contracts
  • Regenerates idempotently (won’t duplicate blocks)

Usage

  1. Place your cursor inside an adapter function.
  2. Run:

Analytics: Generate Contract (Adapter Function)

Shortcut:

  • Windows/Linux: Ctrl + Shift + Alt + D
  • macOS: Cmd + Shift + Alt + D

Notes

  • The extension is intentionally framework-agnostic.
  • If your payload does not include an event field, a placeholder is used.

Author

Livinton Collado — Analytics & Frontend Engineering
https://livinton.dev

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft