मुख्य सामग्री पर जाएँ
Skillpedia
वेबसाइट और UI (frontend)48k · #3807

applicationinsights-web-ts

यह क्या करती है

यह टूल वेब ऐप्स की परफ़ॉर्मेंस और इस्तेमाल पर रियल-टाइम में नज़र रखने में मदद करता है। यह जमा करता है कि यूज़र आपकी साइट से कैसे बातचीत करते हैं, जैसे कौन-से पेज देखे जाते हैं, कौन-से बटन क्लिक होते हैं, और कब error आते हैं।

कब इस्तेमाल करें

  • ✓जब आप जानना चाहते हैं कि असली यूज़र आपकी वेबसाइट का इस्तेमाल कैसे कर रहे हैं।
  • ✓यूज़र के ब्राउज़र में आने वाली errors पहचानने और ठीक करने के लिए।
  • ✓यूज़र किस रास्ते से चलता है और कौन-से क्लिक अहम हैं, यह समझने के लिए।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/applicationinsights-web-ts/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/applicationinsights-web-ts/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं अपनी वेबसाइट की परफ़ॉर्मेंस और यूज़र के सामने आने वाली errors पर कैसे नज़र रखूँ?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

आप अपनी वेबसाइट में कोड की एक छोटी-सी लाइन जोड़ते हैं, जो जानकारी एक मॉनिटरिंग सेवा को भेजती है। यह सेवा डेटा को व्यवस्थित करती है ताकि आप उसे देख सकें।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

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 correlated to backend...

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

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.

# 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)

import { ApplicationInsights } 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: true,          // propagate Request-Id / traceparent to cross-origin AJAX
    enableRequestHeaderTracking: true,
    enableResponseHeaderTracking: true,
    distributedTracingMode: 2,            // DistributedTracingModes.AI_AND_W3C — emit traceparent for backend correlation
    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>:

<script type="text/javascript" src="https://js.monitor.azure.com/scripts/b/ai.3.gbl.min.js" crossorigin="anonymous"></script>
<script type="text/javascript">
  var appInsights = window.appInsights || function (cfg) {

…
अक्सर पूछे जाने वाले सवाल

क्या यह मोबाइल ऐप्स के लिए काम करता है?

यह उन ऐप्स के लिए काम करता है जो React Native से बने हैं, यानी ऐसे ऐप्स जो Android और iOS दोनों पर चलते हैं।

क्लिक ट्रैक करने के लिए क्या मुझे कुछ अलग से इंस्टॉल करना होगा?

हाँ, क्लिक अपने-आप ट्रैक करने के लिए आपको एक अतिरिक्त package `@microsoft/applicationinsights-clickanalytics-js` इंस्टॉल करना होगा।

मॉनिटरिंग कोड कहाँ लगाऊँ?

कोड को वेब पेज के लोड होने की प्रक्रिया में जितनी जल्दी हो सके लगाना सबसे अच्छा है, आमतौर पर `<head>` में या मुख्य script की शुरुआत में।

जानकारी

लेखक का मूल विवरण

Instrument browser/web apps with the Application Insights JavaScript SDK (@microsoft/applicationinsights-web).

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#3807
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills