using-analytics
Track custom events and conversions with Vercel Web Analytics. Covers common events, form tracking, and development testing.
Best use case
using-analytics is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Track custom events and conversions with Vercel Web Analytics. Covers common events, form tracking, and development testing.
Teams using using-analytics should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/using-analytics/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How using-analytics Compares
| Feature / Agent | using-analytics | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Track custom events and conversions with Vercel Web Analytics. Covers common events, form tracking, and development testing.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Working with Analytics
Track custom events and conversions with Vercel Web Analytics. Covers common events, form tracking, and development testing.
## Implement Working with Analytics
Track custom events and conversions with Vercel Web Analytics. Covers common events, form tracking, and development testing.
**See:**
- Resource: `using-analytics` in Fullstack Recipes
- URL: https://fullstackrecipes.com/recipes/using-analytics
---
### Tracking Custom Events
Track user actions and conversions:
```typescript
import { track } from "@vercel/analytics";
// Basic event
track("signup_clicked");
// Event with properties
track("purchase_completed", {
plan: "pro",
price: 29,
currency: "USD",
});
```
### Common Events to Track
Track meaningful user actions:
```typescript
// Authentication
track("signup_completed", { method: "email" });
track("signin_completed", { method: "google" });
// Feature usage
track("chat_started");
track("chat_completed", { messageCount: 5 });
track("file_uploaded", { type: "pdf", size: 1024 });
// Conversions
track("trial_started");
track("subscription_created", { plan: "pro" });
track("upgrade_completed", { from: "free", to: "pro" });
```
### Tracking in Components
```tsx
import { track } from "@vercel/analytics";
function UpgradeButton() {
const handleClick = () => {
track("upgrade_button_clicked", { location: "header" });
// Navigate to upgrade page...
};
return <button onClick={handleClick}>Upgrade</button>;
}
```
### Tracking Form Submissions
```tsx
import { track } from "@vercel/analytics";
function ContactForm() {
const handleSubmit = async (e: FormEvent) => {
e.preventDefault();
track("contact_form_submitted", { source: "footer" });
// Submit form...
};
return <form onSubmit={handleSubmit}>...</form>;
}
```
### Testing in Development
Analytics only send in production by default. For development testing:
```tsx
// In layout.tsx
<Analytics mode="development" />
// Or just log to console
<Analytics debug />
```
### Viewing Analytics
View analytics in the Vercel dashboard:
1. Go to your project in [Vercel Dashboard](https://vercel.com/dashboard)
2. Click "Analytics" in the sidebar
3. View page views, visitors, and custom events
---
## References
- [Vercel Web Analytics](https://vercel.com/docs/analytics)
- [Custom Events](https://vercel.com/docs/analytics/custom-events)Related Skills
vercel-analytics-setup
Add privacy-focused web analytics with Vercel Web Analytics. Track page views, visitors, and custom events with zero configuration.
using-workflows
Create and run durable workflows with steps, streaming, and agent execution. Covers starting, resuming, and persisting workflow results.
using-user-stories
Document and track feature implementation with user stories. Workflow for authoring stories, building features, and marking acceptance criteria as passing.
using-tests
Testing strategy and workflow. Tests run in parallel with isolated data per suite. Prioritize Playwright for UI, integration tests for APIs, unit tests for logic.
using-sentry
Capture exceptions, add context, create performance spans, and use structured logging with Sentry.
using-nuqs
Manage React state in URL query parameters with nuqs. Covers Suspense boundaries, parsers, clearing state, and deep-linkable dialogs.
using-logging
Use structured logging with Pino throughout your application. Covers log levels, context, and workflow-safe logging patterns.
using-drizzle-queries
Write type-safe database queries with Drizzle ORM. Covers select, insert, update, delete, relational queries, and adding new tables.
using-authentication
Use Better Auth for client and server-side authentication. Covers session access, protected routes, sign in/out, and fetching user data.
url-state-management
Sync React state to URL query parameters for shareable filters, search, and deep-linkable dialogs with nuqs.
testing
Complete testing setup with Neon database branching, Playwright browser tests, integration tests, and unit tests. Isolated branches with automatic TTL cleanup.
stripe-subscriptions
Complete subscription billing system with Stripe integration, feature flags for plan gating, webhook handling, and billing portal.