applicationinsights-web-ts
Instrument browser/web apps with the Application Insights JavaScript SDK (@microsoft/applicationinsights-web).
Skill by sickn33
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sickn33-applicationinsights-web-ts
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/applicationinsights-web-ts
What's inside
- Skill name
applicationinsights-web-ts- Description
- Instrument browser/web apps with the Application Insights JavaScript SDK (@microsoft/applicationinsights-web).
- License
- MIT
- Instructions
- 462 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# Application Insights JavaScript SDK (Web) for TypeScript
## When to Use
Use this skill when you need instrument browser/web apps with the Application Insights JavaScript SDK (@microsoft/applicationinsights-web). Use for Real User Monitoring (RUM) — page views, clicks, AJAX/fetch dependencies, exceptions, custom events, and browser-side GenAI agent traces with explicitly verified backend correlation.
Real User Monitoring (RUM) for browser apps with `@microsoft/applicationinsights-web`. Auto-collects page views, AJAX/fetch dependencies, unhandled exceptions, and (with the Click Analytics plugin) clicks. Supports custom events, metrics, and **GenAI agent traces** that follow OpenTelemetry GenAI semantic conventions and correlate to backend spans via W3C Trace Context.
> **Distinct from `azure-monitor-opentelemetry-ts`**, which is for Node.js server apps. This skill is for **browser/web** code (and React Native).
## Before Implementation
Search `microsoft-docs` MCP for current API patterns:
- Query: "Application Insights JavaScript SDK setup"
- Query: "Application Insights JavaScript SDK configuration"
- Query: "Application Insights JavaScript framework extensions React Angular"
- Verify package version: `npm view @microsoft/applicationinsights-web version`
## Packages
| Package | Purpose |
| --- | --- |
| `@microsoft/applicationinsights-web` | Core RUM SDK (page views, AJAX, exceptions). |
| `@microsoft/applicationinsights-clickanalytics-js` | Auto-collect click telemetry. |
| `@microsoft/applicationinsights-react-js` | React plugin (router instrumentation, hooks, HOC, ErrorBoundary). |
| `@microsoft/applicationinsights-react-native` | React Native plugin (native crashes, sessions). |
| `@microsoft/applicationinsights-angularplugin-js` | Angular plugin (router events, ErrorHandler). |
| `@microsoft/applicationinsights-debugplugin-js` | Dev-only telemetry inspector. |
| `@microsoft/applicationinsights-perfmarkmeasure-js` | User Timing (`performance.mark/measure`) integration. |
## Installation
```bash
npm i --save @microsoft/applicationinsights-web
# Optional plugins (install only what you use):
npm i --save @microsoft/applicationinsights-clickanalytics-js
npm i --save @microsoft/applicationinsights-react-js @microsoft/applicationinsights-react-native @microsoft/applicationinsights-angularplugin-js
```
Typings ship with the package — no separate `@types/...` install needed.
## Connection String
The browser SDK requires a connection string at init time. **It ships in plaintext to clients** — Microsoft Entra ID auth is not supported for browser telemetry. Use a separate App Insights resource with local auth enabled for browser RUM if you need to isolate it from backend telemetry.
```bash
# Vite / CRA / Next.js — expose to client via the public env prefix
VITE_APPINSIGHTS_CONNECTION_STRING="InstrumentationKey=...;IngestionEndpoint=https://...;LiveEndpoint=https://..."
NEXT_PUBLIC_APPINSIGHTS_CONNECTION_STRING="InstrumentationKey=..."
```
## Quick Start (npm)
```typescript
import { ApplicationInsights, DistributedTracingModes } from "@microsoft/applicationinsights-web";
export const appInsights = new ApplicationInsights({
config: {
connectionString: import.meta.env.VITE_APPINSIGHTS_CONNECTION_STRING,
enableAutoRouteTracking: true, // SPA route changes -> page views
enableCorsCorrelation: false, // opt in only for approved backend origins // propagate Request-Id / traceparent to cross-origin AJAX
enableRequestHeaderTracking: false, // avoid collecting credentials/PII
enableResponseHeaderTracking: false,
distributedTracingMode: DistributedTracingModes.W3C, // import the enum; do not infer names from numeric literals
autoTrackPageVisitTime: true,
disableFetchTracking: false, // fetch() is auto-instrumented by default
excludeRequestFromAutoTrackingPatterns: [/livemetrics\.azure\.com/i]
}
});
appInsights.loadAppInsights();
appInsights.trackPageView();
```
Call `loadAppInsights()` exactly once, as early as possible (before user interactions you want tracked). Then `trackPageView()` for the initial load — when `enableAutoRouteTracking` is on, subsequent route changes are automatic.
## Quick Start (SDK Loader Script)
Recommended when you want auto-updating SDK and zero build pipeline. Paste this as the **first** `<script>` in `<head>`:
```text
Retrieve and review the complete loader snippet from the official SDK setup page.
The prior queue-shim placeholder was not an implementation and must not be pasted as working code.
```
Loader-only API (queued until SDK loads): `trackEvent`, `trackPageView`, `trackException`, `trackTrace`, `trackDependencyData`, `trackMetric`, `trackPageViewPerformance`, `startTrackPage`, `stopTrackPage`, `startTrackEvent`, `stopTrackEvent`, `addTelemetryInitializer`, `setAuthenticatedUserContext`, `clearAuthenticatedUserContext`, `flush`.
## Core Tracking APIs
```typescript
// Page views (SPAs that disable enableAutoRouteTracking)
appInsights.trackPageView({ name: "Checkout", uri: "/checkout", properties: { cartSize: 3 } });
// Custom events (user actions, business events)
appInsights.trackEvent({ name: "PurchaseCompleted" }, { orderId: "ord_123", amountUsd: 49.95 });
// Exceptions (caught errors)
try {
await pay(order);
} catch (err) {
appInsights.trackException({ exception: err as Error, severityLevel: 3, properties: { orderId: order.id } });
}
// Traces (logs, severity 0=Verbose, 1=Info, 2=Warning, 3=Error, 4=Critical)
appInsights.trackTrace({ message: "Cart hydrated from local storage", severityLevel: 1 });
// Custom metrics (numeric)
appInsights.trackMetric({ name: "checkout.duration_ms", average: 1234 });
// Dependencies (manually-tracked outbound calls — fetch/XHR are auto-tracked)
appInsights.trackDependencyData({
id: crypto.randomUUID(),
name: "GET /api/orders",
duration: 87, success: true, responseCode: 200,
data: "https://api.example.com/api/orders", target: "api.example.com", type: "Fetch"
});
// User identity (set ONCE per authenticated session — values are PII; do not pass emails)From sickn33/agentic-awesome-skills, MIT.
More from sickn33/agentic-awesome-skills
- 0.881score
asset-inventory
devops-skills
Maintain IT asset inventory and configuration management database.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.881score
arm-templates
devops-skills
Deploy Azure resources with ARM templates and Bicep.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.881score
access-review
devops-skills
Conduct periodic access reviews and certifications.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.878score
ai-coding-agent-guardrails
devops-skills
Secure AI coding agents (Claude Code, Cursor, Codex, Copilot) with permission boundaries, secret protection, code review gates, and safe sandbox…
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.878score
agents-generator
OJPalenzuela
Generate project-specific AGENTS.md and companion rules by analyzing a codebase.
SkillAFreshness: A★ 48.4KClaude Code - 0.876score
aws-lambda
devops-skills
Build and deploy serverless functions on AWS Lambda.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-s3
devops-skills
Configure S3 buckets, policies, and lifecycle rules.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-iam
devops-skills
Manage IAM users, roles, and policies.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-rds
devops-skills
Provision and manage RDS databases.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
azure-aks
devops-skills
Deploy and manage Azure Kubernetes Service clusters.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-vpc
devops-skills
Design and implement VPCs and networking.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.876score
aws-ecs-fargate
devops-skills
Deploy containers on ECS and Fargate.
SkillAFreshness: A★ 48.4KClaude Code +9
Signals
- Stars
- 48,428
- Forks
- 7,039
- Open issues
- 0
- Last commit (this folder)
- Oct 24, 2026 (5 days ago)
- Last release
- Oct 24, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- aaskills.tech/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from sickn33
- 0.665score
agentphone
sickn33
Build AI phone agents with AgentPhone API.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
ai-seo
sickn33
Optimize content for AI search and LLM citations across AI Overviews, ChatGPT, Perplexity, Claude, Gemini, and similar systems.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
agent-evaluation
sickn33
Evaluate agent behavior with versioned cases and explicit verifiers.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
agent-memory-systems
sickn33
Design tenant-scoped memory, retrieval and retention for agents.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
add-app-clip
sickn33
Add an iOS App Clip target to an Expo app.
SkillAFreshness: A★ 48.4KClaude Code +9 - 0.665score
angular-best-practices
sickn33
Angular performance optimization and best practices guide.
SkillAFreshness: A★ 48.4KClaude Code +9
Cite this page
applicationinsights-web-ts skill. Agent Mart. https://agentmart.dev/skills/sickn33-applicationinsights-web-ts (last updated 2026-10-24)