File size: 73,603 Bytes
7293b6f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
<!DOCTYPE html><html
	class="hasSidebar hasPageActions hasBreadcrumb conceptual has-default-focus theme-light"
	lang="en-us"
	dir="ltr"
	data-authenticated="false"
	data-auth-status-determined="false"
	data-target="docs"
	x-ms-format-detection="none">

<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta property="og:title" content="Microsoft Azure Monitor Application Insights JavaScript SDK - Azure Monitor" />
	<meta property="og:type" content="website" />
	<meta property="og:url" content="https://learn.microsoft.com/en-us/azure/azure-monitor/app/javascript-sdk" /><meta property="og:description" content="Microsoft Azure Monitor Application Insights JavaScript SDK is a powerful tool for monitoring and analyzing web application performance." /><meta property="og:image" content="https://learn.microsoft.com/en-us/media/open-graph-image.png" />

	<meta property="og:image:alt" content="Microsoft Learn" />

	<meta name="twitter:card" content="summary_large_image" />

	<meta name="twitter:site" content="@MicrosoftLearn" />

	<meta name="color-scheme" content="light dark"><meta name="author" content="AaronMaxwell" />
<meta name="breadcrumb_path" content="../../breadcrumb/azure-monitor/toc.json" />
<meta name="depot_name" content="Learn.azure-monitor" />
<meta name="description" content="Microsoft Azure Monitor Application Insights JavaScript SDK is a powerful tool for monitoring and analyzing web application performance." />
<meta name="document_id" content="1161fd28-6f64-8733-1ad5-6062e786446a" />
<meta name="document_version_independent_id" content="08ac573e-3bb7-f585-a709-0ea51f61fc22" />
<meta name="feedback_help_link_type" content="get-help-at-qna" />
<meta name="feedback_help_link_url" content="https://learn.microsoft.com/answers/tags/20/azure-monitor/" />
<meta name="feedback_product_url" content="https://feedback.azure.com/d365community/forum/3887dc70-2025-ec11-b6e6-000d3a4f09d0" />
<meta name="feedback_system" content="Standard" />
<meta name="git_commit_id" content="a4532c790eed1ea0e5149f74296d04ee24084c8e" />
<meta name="gitcommit" content="https://github.com/MicrosoftDocs/azure-monitor-docs-pr/blob/a4532c790eed1ea0e5149f74296d04ee24084c8e/articles/azure-monitor/app/javascript-sdk.md" />
<meta name="learn_banner_products" content="azure" />
<meta name="locale" content="en-us" />
<meta name="manager" content="orspodek" />
<meta name="ms.author" content="aaronmax" />
<meta name="ms.custom" content="devx-track-js" />
<meta name="ms.date" content="12/07/2024" />
<meta name="ms.devlang" content="javascript" />
<meta name="ms.reviewer" content="mmcc" />
<meta name="ms.service" content="azure-monitor" />
<meta name="ms.subservice" content="application-insights" />
<meta name="ms.suite" content="office" />
<meta name="ms.topic" content="conceptual" />
<meta name="original_content_git_url" content="https://github.com/MicrosoftDocs/azure-monitor-docs-pr/blob/live/articles/azure-monitor/app/javascript-sdk.md" />
<meta name="page_type" content="conceptual" />
<meta name="permissioned-type" content="public" />
<meta name="recommendation_types" content="Training" />
<meta name="recommendation_types" content="Certification" />
<meta name="recommendations" content="true" />
<meta name="schema" content="Conceptual" />
<meta name="site_name" content="Docs" />
<meta name="toc_rel" content="../toc.json" />
<meta name="uhfHeaderId" content="azure" />
<meta name="updated_at" content="2024-11-07 10:59 PM" />
<meta name="word_count" content="2408" />
<meta name="persistent_id" content="5ee12f97-7da4-54b5-04e2-b360dc43b1c1" />
	
	<meta name="cmProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/07bb3e10-d135-43ff-bc8b-360497cb39fa" data-source="generated" />
	
	<meta name="spProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/12e559b9-eaf6-4aee-9af7-62334e15f863" data-source="generated" />
	<meta name="scope" content="Azure, Azure Monitor" /><meta name="github_feedback_content_git_url" content="https://github.com/MicrosoftDocs/azure-monitor-docs/blob/main/articles/azure-monitor/app/javascript-sdk.md" /><link href="https://learn.microsoft.com/en-us/azure/azure-monitor/app/javascript-sdk" rel="canonical"><title>Microsoft Azure Monitor Application Insights JavaScript SDK - Azure Monitor | Microsoft Learn</title><link rel="stylesheet" href="/static/assets/0.4.029026183/styles/site-ltr.css">

	<script id="msdocs-script">
	var msDocs = {environment: {
			supportLevel: 'production',
			accessLevel: 'online',
			reviewFeatures: false,
			systemContent: true,
			azurePortalHostname: 'portal.azure.com',
			legacyHosting: false,
			siteName: 'learn',
		},data: {
			timeOrigin: Date.now(),
			contentLocale: 'en-us',
			contentDir: 'ltr',
			userLocale: 'en-us',
			userDir: 'ltr',
			pageTemplate: 'Conceptual',
			brand: 'azure',
			context: {},
			hasBinaryRating: true,
			feedbackHelpLinkType:'get-help-at-qna',
			feedbackHelpLinkUrl:'https://learn.microsoft.com/answers/tags/20/azure-monitor/',
			standardFeedback: true,
			showFeedbackReport: false,
			enableTutorialFeedback: false,
			feedbackSystem: 'Standard',
			feedbackGitHubRepo: 'MicrosoftDocs/azure-docs',
			feedbackProductUrl: 'https://feedback.azure.com/d365community/forum/3887dc70-2025-ec11-b6e6-000d3a4f09d0',extendBreadcrumb: false,isEditDisplayable: true,
			hideViewSource: false,
			hasPageActions: true,
			hasPrintButton: true,
			hasBookmark: true,
			hasShare: true,
			isPermissioned: false,
			isPrivateUnauthorized: false,hasRecommendations: true,contributors: [{ name: "AaronMaxwell", url: "https://github.com/AaronMaxwell" },{ name: "kainawroth", url: "https://github.com/kainawroth" },{ name: "KrishnaG-MSFT", url: "https://github.com/KrishnaG-MSFT" },{ name: "mattmccleary", url: "https://github.com/mattmccleary" },{ name: "v-jbasden", url: "https://github.com/v-jbasden" },{ name: "prmerger-automator[bot]", url: "https://github.com/prmerger-automator[bot]" },{ name: "arjun-ga", url: "https://github.com/arjun-ga" },{ name: "toddfoust", url: "https://github.com/toddfoust" },{ name: "ramthi", url: "https://github.com/ramthi" }],},
		functions:{}
	};
	</script><script src="https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js"></script>
	<script src="https://js.monitor.azure.com/scripts/c/ms.jsll-4.min.js"></script><script src="/static/assets/0.4.029026183/global/deprecation.js"></script><script src="/static/assets/0.4.029026183/scripts/en-us/index-docs.js"></script></head>

<body lang="en-us" dir="ltr">
	<div class="header-holder has-default-focus">
		<a href="#main" style="z-index: 1070" class="outline-color-text visually-hidden-until-focused position-fixed inner-focus focus-visible top-0 left-0 right-0 padding-xs text-align-center  has-body-background" tabindex="1">Skip to main content</a><div hidden id="cookie-consent-holder" data-test-id="cookie-consent-container"></div>

		<div id="unsupported-browser" style="
			background-color: white;
			color: black;
			padding: 16px;
			border-bottom: 1px solid grey;"
			hidden
		>
			<div style="max-width: 800px; margin: 0 auto;">
				<p style="font-size: 24px">This browser is no longer supported.</p>
				<p style="font-size: 16px; margin-top: 16px;">Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.</p>
				<div style="margin-top: 12px;">
					<a href="https://go.microsoft.com/fwlink/p/?LinkID=2092881 "
						style="
						background-color: #0078d4;
						border: 1px solid #0078d4;
						color: white;
						padding: 6px 12px;
						border-radius: 2px;
						display: inline-block;
						">Download Microsoft Edge</a>
					<a href="https://learn.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-edge"
						style="
							background-color: white;
							padding: 6px 12px;
							border: 1px solid #505050;
							color: #171717;
							border-radius: 2px;
							display: inline-block;
							">More info about Internet Explorer and Microsoft Edge</a>
				</div>
			</div>
		</div>
		<!-- liquid-tag banners global -->

		<!-- site header -->
		<header id="ms--site-header" data-test-id="site-header-wrapper" role="banner" itemscope="itemscope" itemtype="http://schema.org/Organization">
			<div id="ms--mobile-nav" class="site-header display-none-tablet padding-inline-none gap-none" data-bi-name="mobile-header" data-test-id="mobile-header"></div>
			<div id="ms--primary-nav" class="site-header display-none display-flex-tablet" data-bi-name="L1-header" data-test-id="primary-header"></div>
			<div id="ms--secondary-nav" class="site-header display-none display-flex-tablet" data-bi-name="L2-header" data-test-id="secondary-header"></div>
		</header><div id="content-header" class="content-header uhf-container has-padding has-default-focus border-bottom-none" data-bi-name="content-header">
				<div class="content-header-controls margin-xxs margin-inline-sm-tablet">
					<button type="button" class="contents-button button button-sm margin-right-xxs" data-bi-name="contents-expand" aria-haspopup="true" data-contents-button>
						<span class="icon"><span class="docon docon-menu" aria-hidden="true"></span></span>
						<span class="contents-expand-title">Table of contents</span>
					</button>
					<button type="button" class="ap-collapse-behavior ap-expanded button button-sm" data-bi-name="ap-collapse" aria-controls="action-panel">
						<span class="icon"><span class="docon docon-exit-mode" aria-hidden="true"></span></span>
						<span>Exit focus mode</span>
					</button>
				</div>
			</div><div id="disclaimer-holder" class="has-overflow-hidden has-default-focus">
			<!-- liquid-tag banners sectional -->
		</div>
	</div>

	<div class="mainContainer  uhf-container has-default-focus" data-bi-name="body">

		<div class="columns has-large-gaps is-gapless-mobile "><div id="left-container" class="left-container is-hidden-mobile column is-one-third-tablet is-one-quarter-desktop">
				<nav id="affixed-left-container" class="margin-top-sm-tablet position-sticky display-flex flex-direction-column" aria-label="Primary"></nav>
			</div><!-- .primary-holder -->
			<section class="primary-holder column is-two-thirds-tablet is-three-quarters-desktop">
				<!--div.columns -->
				<div class="columns is-gapless-mobile has-large-gaps "><div id="main-column" class="column  is-full is-8-desktop">

						<main id="main" class="" role="main" data-bi-name="content" lang="en-us" dir="ltr"><!-- article-header -->
							<div id="article-header" class="background-color-body margin-top-sm-tablet margin-bottom-xs display-none-print">
								<div class="display-flex align-items-center "><details id="article-header-breadcrumbs-overflow-popover" class="popover" data-for="article-header-breadcrumbs">
										<summary class="button button-clear button-primary button-sm inner-focus" aria-label="All breadcrumbs">
											<span class="icon">
												<span class="docon docon-more"></span>
											</span>
										</summary>
										<div id="article-header-breadcrumbs-overflow" class="popover-content padding-none">

										</div>
									</details>

									<bread-crumbs id="article-header-breadcrumbs" data-test-id="article-header-breadcrumbs" class="overflow-hidden flex-grow-1 margin-right-sm margin-right-md-tablet margin-right-lg-desktop margin-left-negative-xxs padding-left-xxs"></bread-crumbs><div id="article-header-page-actions"  class="opacity-none margin-left-auto display-flex flex-wrap-no-wrap align-items-stretch"><a
											id="lang-link-tablet"
											class="button button-primary button-clear button-sm display-none display-inline-flex-tablet"
											title="Read in English" data-bi-name="language-toggle"
											data-read-in-link
											hidden>
											<span class="icon margin-none" aria-hidden="true" data-read-in-link-icon>
												<span class="docon docon-locale-globe"></span>
											</span>
											<span class="is-visually-hidden" data-read-in-link-text>Read in English</span>
										</a><button
												type="button"
												class="collection button button-clear button-sm button-primary display-none display-inline-flex-tablet"
												data-list-type="collection"
												data-bi-name="collection"
												title="Add to collection">
												<span class="icon margin-none" aria-hidden="true">
													<span class="docon docon-circle-addition"></span>
												</span>
												<span class="collection-status is-visually-hidden">Save</span>
											</button><a	data-contenteditbtn
												class="button button-clear button-sm text-decoration-none button-primary display-none display-inline-flex-tablet"
												aria-label="Edit"
												title="Edit This Document"
												data-bi-name="edit"
														href="https://github.com/MicrosoftDocs/azure-monitor-docs/blob/main/articles/azure-monitor/app/javascript-sdk.md"
														data-original_content_git_url="https://github.com/MicrosoftDocs/azure-monitor-docs-pr/blob/live/articles/azure-monitor/app/javascript-sdk.md"
														data-original_content_git_url_template="{repo}/blob/{branch}/articles/azure-monitor/app/javascript-sdk.md"
														data-pr_repo=""
														data-pr_branch="">
												<span class="icon margin-none" aria-hidden="true">
													<span class="docon docon-edit-outline"></span>
												</span>
											</a>
										<details class="popover popover-right" id="article-header-page-actions-overflow">
											<summary class="justify-content-flex-start button button-clear button-sm button-primary" aria-label="More actions" title="More actions">
												<span class="icon" aria-hidden="true">
													<span class="docon docon-more-vertical"></span>
												</span>
											</summary>
											<div class="popover-content padding-xs"><button
														data-page-action-item="overflow-mobile"
														type="button"
														class="justify-content-flex-start button-block button-sm has-inner-focus button button-clear display-none-tablet"
														data-bi-name="contents-expand"
														data-contents-button
														data-popover-close>
														<span class="icon">
															<span class="docon docon-editor-list-bullet" aria-hidden="true"></span>
														</span><span class="contents-expand-title">Table of contents</span></button><a
													id="lang-link-overflow"
													class="justify-content-flex-start button-sm has-inner-focus button button-clear button-block display-none-tablet"
													title="Read in English" data-bi-name="language-toggle"
													data-page-action-item="overflow-mobile"
													data-check-hidden="true"
													data-read-in-link
													hidden
													>
													<span class="icon" aria-hidden="true" data-read-in-link-icon>
														<span class="docon docon-locale-globe"></span>
													</span>
													<span data-read-in-link-text>Read in English</span>
												</a><button
														type="button"
														class="collection justify-content-flex-start button button-clear button-sm has-inner-focus button-block display-none-tablet"
														data-list-type="collection"
														data-bi-name="collection"
														title="Save"
														data-page-action-item="overflow-mobile"
														data-check-hidden="true"
														data-popover-close>
														<span class="icon" aria-hidden="true">
															<span class="docon docon-circle-addition"></span>
														</span>
														<span class="collection-status">Save</span>
													</button>

			 										
													<button
													 	type="button"
														class="collection justify-content-flex-start button button-clear button-sm has-inner-focus button-block display-none-tablet"
														data-list-type="plan"
														data-bi-name="plan"
														title="Add to Plan"
														data-page-action-item="overflow-mobile"
														data-check-hidden="true"
														data-popover-close
														hidden>
														<span class="icon" aria-hidden="true">
															<span class="docon docon-circle-addition"></span>
														</span>
														<span class="plan-status">Add to Plan</span>
													</button><a	data-contenteditbtn
														class="button button-clear button-block button-sm has-inner-focus justify-content-flex-start text-decoration-none display-none-tablet"
														aria-label="Edit"
														title="Edit This Document"
														data-bi-name="edit"
																href="https://github.com/MicrosoftDocs/azure-monitor-docs/blob/main/articles/azure-monitor/app/javascript-sdk.md"
																data-original_content_git_url="https://github.com/MicrosoftDocs/azure-monitor-docs-pr/blob/live/articles/azure-monitor/app/javascript-sdk.md"
																data-original_content_git_url_template="{repo}/blob/{branch}/articles/azure-monitor/app/javascript-sdk.md"
																data-pr_repo=""
																data-pr_branch="">
														<span class="icon" aria-hidden="true">
															<span class="docon docon-edit-outline"></span>
														</span>
														<span>Edit</span>
													</a><div aria-hidden="true" class="margin-none" data-page-action-item="overflow-all"></div>
														<hr class="display-none-tablet margin-bottom-xxs margin-top-xxs" />
														<h4 class="font-size-sm padding-left-xxs">Share via</h4>

													<a class="button button-clear button-sm button-block has-inner-focus text-decoration-none justify-content-flex-start share-facebook" data-bi-name="facebook" data-page-action-item="overflow-all">
															<span class="icon" aria-hidden="true">
																<span class="docon docon-facebook-share font-size-md color-primary"></span>
															</span>
															<span class="margin-left-xxs">Facebook</span>
														</a>
														<a class="button button-clear button-sm has-inner-focus button-block text-decoration-none justify-content-flex-start share-twitter" data-bi-name="twitter" data-page-action-item="overflow-all">
															<span class="icon" aria-hidden="true">
																<span class="docon docon-xlogo-share font-size-xxs"></span>
															</span>
															<span class="margin-left-xxs">x.com</span>
														</a>
														<a class="button button-clear button-sm has-inner-focus button-block text-decoration-none justify-content-flex-start share-linkedin" data-bi-name="linkedin" data-page-action-item="overflow-all">
															<span class="icon" aria-hidden="true">
																<span class="docon docon-linked-in-logo font-size-sm color-primary"></span>
															</span>
															<span class="margin-left-xxs">LinkedIn</span>
														</a>
														<a class="button button-clear button-sm button-block has-inner-focus text-decoration-none justify-content-flex-start margin-bottom-xxs share-email" data-bi-name="email" data-page-action-item="overflow-all">
															<span class="icon" aria-hidden="true">
																<span class="docon docon-mail-message font-size-sm color-primary"></span>
															</span>
															<span class="margin-left-xxs">Email</span>
														</a><hr />
													<button
														class="button button-block button-clear button-sm justify-content-flex-start has-inner-focus margin-top-xxs"
														title="Print"
														type="button"
														aria-label="Print"
														data-bi-name="print"
														data-page-action-item="overflow-all"
														data-popover-close
														data-print-page
														data-check-hidden="true">
														<span class="icon" aria-hidden="true">
															<span class="docon docon-print font-size-sm color-primary"></span>
														</span>
														<span class="margin-left-xxs">Print</span>
													</button>
											</div>
										</details>
										
									</div></div>
							</div>
							<!-- end article-header --><div>
								<button type="button" class="border contents-button button button-clear button-sm is-hidden-tablet has-inner-focus" data-bi-name="contents-expand" data-contents-button hidden>
									<span class="icon">
										<span class="docon docon-editor-list-bullet" aria-hidden="true"></span>
									</span><span class="contents-expand-title">Table of contents</span></button>
							</div><!-- end mobile-contents button  -->

							<div class="content "><h1 id="enable-azure-monitor-application-insights-real-user-monitoring">Enable Azure Monitor Application Insights Real User Monitoring</h1><div class="display-flex justify-content-space-between align-items-center flex-wrap-wrap page-metadata-container">
										<div class="margin-right-xxs">
											<ul class="metadata page-metadata" data-bi-name="page info" lang="en-us" dir="ltr"><li>Article</li><li class="visibility-hidden-visual-diff"><time class="is-invisible" data-article-date aria-label="Article review date" datetime="2024-12-07T08:00:00Z" data-article-date-source="calculated">12/07/2024</time>
															</li><li class="contributors-holder display-none-print">
															<button aria-label="View all contributors" class="contributors-button link-button" data-bi-name="contributors" title="View all contributors">9 contributors</button>
														</li></ul>
										</div>
<div id="user-feedback" class="margin-block-xxs display-none-print" data-hide-on-archived>
	<button
		id="user-feedback-button"
		data-test-id="conceptual-feedback-button"
		class="button button-sm button-clear button-primary"
		type="button"
		data-bi-name="user-feedback-button"
		data-user-feedback-button
	>
		<span class="icon" aria-hidden="true">
			<span class="docon docon-like"></span>
		</span>
		<span>Feedback</span>
	</button>
</div></div><nav id="center-doc-outline" class="doc-outline is-hidden-desktop display-none-print margin-bottom-sm" data-bi-name="intopic toc" aria-label="In this article">
											<h2 id="ms--in-this-article" class="title is-6 margin-block-xs">In this article</h2>
										</nav><!-- <content> --><p>The Microsoft Azure Monitor Application Insights JavaScript SDK collects usage data, which allows you to monitor and analyze the performance of JavaScript web applications. This is commonly referred to as Real User Monitoring or RUM.</p>
<p>The Application Insights JavaScript SDK has a base SDK and several plugins for more capabilities.</p>
<p><span class="mx-imgBorder">
<a href="media/javascript-sdk/conceptual-diagram-javascript-sdk.png#lightbox" data-linktype="relative-path">
<img src="media/javascript-sdk/conceptual-diagram-javascript-sdk.png" alt="Conceptual diagram that shows the Application Insights JavaScript SDK, its plugins/extensions, and their relationship to each other." data-linktype="relative-path">
</a>
</span>
</p>
<p>We collect page views by default. But if you want to also collect clicks by default, consider adding the <a href="javascript-feature-extensions" data-linktype="relative-path">Click Analytics Auto-Collection plug-in</a>:</p>
<ul>
<li>If you're adding a <a href="javascript-framework-extensions" data-linktype="relative-path">framework extension</a>, which you can <a href="#optional-add-advanced-sdk-configuration" data-linktype="self-bookmark">add</a> after you follow the steps to <a href="#get-started" data-linktype="self-bookmark">get started</a>, you can optionally add Click Analytics when you add the framework extension.</li>
<li>If you're not adding a framework extension, <a href="javascript-feature-extensions" data-linktype="relative-path">add the Click Analytics plug-in</a> after you follow the steps to get started.</li>
</ul>
<p>We provide the <a href="https://github.com/microsoft/ApplicationInsights-JS/blob/main/extensions/applicationinsights-debugplugin-js/README.md" data-linktype="external">Debug plugin</a> and <a href="https://github.com/microsoft/ApplicationInsights-JS/blob/main/extensions/applicationinsights-perfmarkmeasure-js/README.md" data-linktype="external">Performance plugin</a> for debugging/testing. In rare cases, it's possible to build your own extension by adding a <a href="https://github.com/microsoft/ApplicationInsights-JS/blob/e4be62c0aa9318b540157118b729bb0c4d8b6c6e/API-reference.md#custom-extension" data-linktype="external">custom plugin</a>.</p>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li>Azure subscription: <a href="https://azure.microsoft.com/free/" data-linktype="external">Create an Azure subscription for free</a></li>
<li>Application Insights resource: <a href="create-workspace-resource#create-a-workspace-based-resource" data-linktype="relative-path">Create an Application Insights resource</a></li>
<li>An application that uses <a href="/en-us/visualstudio/javascript" data-linktype="absolute-path">JavaScript</a></li>
</ul>
<h2 id="get-started">Get started</h2>
<p>Follow the steps in this section to instrument your application with the Application Insights JavaScript SDK.</p>
<div class="TIP">
<p>Tip</p>
<p>Good news! We're making it even easier to enable JavaScript with JavaScript (Web) SDK Loader Script injection by configuration.</p>
<ul>
<li><a href="asp-net-core?tabs=netcorenew,netcore6#enable-client-side-telemetry-for-web-applications" data-linktype="relative-path">ASP.NET Core</a></li>
<li><a href="nodejs#browser-sdk-loader" data-linktype="relative-path">Node.js</a></li>
<li><a href="java-standalone-config#browser-sdk-loader-preview" data-linktype="relative-path">Java</a></li>
</ul>
</div>
<h3 id="add-the-javascript-code">Add the JavaScript code</h3>
<p>Two methods are available to add the code to enable Application Insights via the Application Insights JavaScript SDK:</p>
<table>
<thead>
<tr>
<th style="text-align: left;">Method</th>
<th style="text-align: left;">When would I use this method?</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">JavaScript (Web) SDK Loader Script</td>
<td style="text-align: left;">For most customers, we recommend the JavaScript (Web) SDK Loader Script because you never have to update the SDK and you get the latest updates automatically. Also, you have control over which pages you add the Application Insights JavaScript SDK to.</td>
</tr>
<tr>
<td style="text-align: left;">npm package</td>
<td style="text-align: left;">You want to bring the SDK into your code and enable IntelliSense. This option is only needed for developers who require more custom events and configuration. This method is required if you plan to use the React, React Native, or Angular Framework Extension.</td>
</tr>
</tbody>
</table>
<div class="tabGroup" id="tabgroup_1">
<ul role="tablist">
<li role="presentation">
<a href="#tabpanel_1_javascriptwebsdkloaderscript" role="tab" aria-controls="tabpanel_1_javascriptwebsdkloaderscript" data-tab="javascriptwebsdkloaderscript" tabindex="0" aria-selected="true" data-linktype="self-bookmark">JavaScript (Web) SDK Loader Script</a>
</li>
<li role="presentation">
<a href="#tabpanel_1_npmpackage" role="tab" aria-controls="tabpanel_1_npmpackage" data-tab="npmpackage" tabindex="-1" data-linktype="self-bookmark">npm package</a>
</li>
</ul>
<section id="tabpanel_1_javascriptwebsdkloaderscript" role="tabpanel" data-tab="javascriptwebsdkloaderscript">

<ol>
<li><p>Paste the JavaScript (Web) SDK Loader Script at the top of each page for which you want to enable Application Insights.</p>
<p>Preferably, you should add it as the first script in your <code>&lt;head&gt;</code> section so that it can monitor any potential issues with all of your dependencies.</p>
<p>If Internet Explorer 8 is detected, JavaScript SDK v2.x is automatically loaded.</p>
 <!-- IMPORTANT: If you're updating this code example, please remember to also update it in: 1) articles\azure-monitor\app\javascript-feature-extensions.md and 2) articles\azure-monitor\app\api-filtering-sampling.md -->
<pre><code class="lang-html">&lt;script type="text/javascript"&gt;
!(function (cfg){function e(){cfg.onInit&amp;&amp;cfg.onInit(n)}var x,w,D,t,E,n,C=window,O=document,b=C.location,q="script",I="ingestionendpoint",L="disableExceptionTracking",j="ai.device.";"instrumentationKey"[x="toLowerCase"](),w="crossOrigin",D="POST",t="appInsightsSDK",E=cfg.name||"appInsights",(cfg.name||C[t])&amp;&amp;(C[t]=E),n=C[E]||function(g){var f=!1,m=!1,h={initialize:!0,queue:[],sv:"8",version:2,config:g};function v(e,t){var n={},i="Browser";function a(e){e=""+e;return 1===e.length?"0"+e:e}return n[j+"id"]=i[x](),n[j+"type"]=i,n["ai.operation.name"]=b&amp;&amp;b.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(h.sv||h.version),{time:(i=new Date).getUTCFullYear()+"-"+a(1+i.getUTCMonth())+"-"+a(i.getUTCDate())+"T"+a(i.getUTCHours())+":"+a(i.getUTCMinutes())+":"+a(i.getUTCSeconds())+"."+(i.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z",iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}},ver:undefined,seq:"1",aiDataContract:undefined}}var n,i,t,a,y=-1,T=0,S=["js.monitor.azure.com","js.cdn.applicationinsights.io","js.cdn.monitor.azure.com","js0.cdn.applicationinsights.io","js0.cdn.monitor.azure.com","js2.cdn.applicationinsights.io","js2.cdn.monitor.azure.com","az416426.vo.msecnd.net"],o=g.url||cfg.src,r=function(){return s(o,null)};function s(d,t){if((n=navigator)&amp;&amp;(~(n=(n.userAgent||"").toLowerCase()).indexOf("msie")||~n.indexOf("trident/"))&amp;&amp;~d.indexOf("ai.3")&amp;&amp;(d=d.replace(/(\/)(ai\.3\.)([^\d]*)$/,function(e,t,n){return t+"ai.2"+n})),!1!==cfg.cr)for(var e=0;e&lt;S.length;e++)if(0&lt;d.indexOf(S[e])){y=e;break}var n,i=function(e){var a,t,n,i,o,r,s,c,u,l;h.queue=[],m||(0&lt;=y&amp;&amp;T+1&lt;S.length?(a=(y+T+1)%S.length,p(d.replace(/^(.*\/\/)([\w\.]*)(\/.*)$/,function(e,t,n,i){return t+S[a]+i})),T+=1):(f=m=!0,s=d,!0!==cfg.dle&amp;&amp;(c=(t=function(){var e,t={},n=g.connectionString;if(n)for(var i=n.split(";"),a=0;a&lt;i.length;a++){var o=i[a].split("=");2===o.length&amp;&amp;(t[o[0][x]()]=o[1])}return t[I]||(e=(n=t.endpointsuffix)?t.location:null,t[I]="https://"+(e?e+".":"")+"dc."+(n||"services.visualstudio.com")),t}()).instrumentationkey||g.instrumentationKey||"",t=(t=(t=t[I])&amp;&amp;"/"===t.slice(-1)?t.slice(0,-1):t)?t+"/v2/track":g.endpointUrl,t=g.userOverrideEndpointUrl||t,(n=[]).push((i="SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details)",o=s,u=t,(l=(r=v(c,"Exception")).data).baseType="ExceptionData",l.baseData.exceptions=[{typeName:"SDKLoadFailed",message:i.replace(/\./g,"-"),hasFullStack:!1,stack:i+"\nSnippet failed to load ["+o+"] -- Telemetry is disabled\nHelp Link: https://go.microsoft.com/fwlink/?linkid=2128109\nHost: "+(b&amp;&amp;b.pathname||"_unknown_")+"\nEndpoint: "+u,parsedStack:[]}],r)),n.push((l=s,i=t,(u=(o=v(c,"Message")).data).baseType="MessageData",(r=u.baseData).message='AI (Internal): 99 message:"'+("SDK LOAD Failure: Failed to load Application Insights SDK script (See stack for details) ("+l+")").replace(/\"/g,"")+'"',r.properties={endpoint:i},o)),s=n,c=t,JSON&amp;&amp;((u=C.fetch)&amp;&amp;!cfg.useXhr?u(c,{method:D,body:JSON.stringify(s),mode:"cors"}):XMLHttpRequest&amp;&amp;((l=new XMLHttpRequest).open(D,c),l.setRequestHeader("Content-type","application/json"),l.send(JSON.stringify(s)))))))},a=function(e,t){m||setTimeout(function(){!t&amp;&amp;h.core||i()},500),f=!1},p=function(e){var n=O.createElement(q),e=(n.src=e,t&amp;&amp;(n.integrity=t),n.setAttribute("data-ai-name",E),cfg[w]);return!e&amp;&amp;""!==e||"undefined"==n[w]||(n[w]=e),n.onload=a,n.onerror=i,n.onreadystatechange=function(e,t){"loaded"!==n.readyState&amp;&amp;"complete"!==n.readyState||a(0,t)},cfg.ld&amp;&amp;cfg.ld&lt;0?O.getElementsByTagName("head")[0].appendChild(n):setTimeout(function(){O.getElementsByTagName(q)[0].parentNode.appendChild(n)},cfg.ld||0),n};p(d)}cfg.sri&amp;&amp;(n=o.match(/^((http[s]?:\/\/.*\/)\w+(\.\d+){1,5})\.(([\w]+\.){0,2}js)$/))&amp;&amp;6===n.length?(d="".concat(n[1],".integrity.json"),i="@".concat(n[4]),l=window.fetch,t=function(e){if(!e.ext||!e.ext[i]||!e.ext[i].file)throw Error("Error Loading JSON response");var t=e.ext[i].integrity||null;s(o=n[2]+e.ext[i].file,t)},l&amp;&amp;!cfg.useXhr?l(d,{method:"GET",mode:"cors"}).then(function(e){return e.json()["catch"](function(){return{}})}).then(t)["catch"](r):XMLHttpRequest&amp;&amp;((a=new XMLHttpRequest).open("GET",d),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE)if(200===a.status)try{t(JSON.parse(a.responseText))}catch(e){r()}else r()},a.send())):o&amp;&amp;r();try{h.cookie=O.cookie}catch(k){}function e(e){for(;e.length;)!function(t){h[t]=function(){var e=arguments;f||h.queue.push(function(){h[t].apply(h,e)})}}(e.pop())}var c,u,l="track",d="TrackPage",p="TrackEvent",l=(e([l+"Event",l+"PageView",l+"Exception",l+"Trace",l+"DependencyData",l+"Metric",l+"PageViewPerformance","start"+d,"stop"+d,"start"+p,"stop"+p,"addTelemetryInitializer","setAuthenticatedUserContext","clearAuthenticatedUserContext","flush"]),h.SeverityLevel={Verbose:0,Information:1,Warning:2,Error:3,Critical:4},(g.extensionConfig||{}).ApplicationInsightsAnalytics||{});return!0!==g[L]&amp;&amp;!0!==l[L]&amp;&amp;(e(["_"+(c="onerror")]),u=C[c],C[c]=function(e,t,n,i,a){var o=u&amp;&amp;u(e,t,n,i,a);return!0!==o&amp;&amp;h["_"+c]({message:e,url:t,lineNumber:n,columnNumber:i,error:a,evt:C.event}),o},g.autoExceptionInstrumented=!0),h}(cfg.cfg),(C[E]=n).queue&amp;&amp;0===n.queue.length?(n.queue.push(e),n.trackPageView({})):e();})({
  src: "https://js.monitor.azure.com/scripts/b/ai.3.gbl.min.js",
  // name: "appInsights", // Global SDK Instance name defaults to "appInsights" when not supplied
  // ld: 0, // Defines the load delay (in ms) before attempting to load the sdk. -1 = block page load and add to head. (default) = 0ms load after timeout,
  // useXhr: 1, // Use XHR instead of fetch to report failures (if available),
  // dle: true, // Prevent the SDK from reporting load failure log
  crossOrigin: "anonymous", // When supplied this will add the provided value as the cross origin attribute on the script tag
  // onInit: null, // Once the application insights instance has loaded and initialized this callback function will be called with 1 argument -- the sdk instance (DON'T ADD anything to the sdk.queue -- As they won't get called)
  // sri: false, // Custom optional value to specify whether fetching the snippet from integrity file and do integrity check
  cfg: { // Application Insights Configuration
    connectionString: "YOUR_CONNECTION_STRING"
}});
&lt;/script&gt;
</code></pre>
</li>
<li><p>(Optional) Add or update optional <a href="#javascript-web-sdk-loader-script-configuration" data-linktype="self-bookmark">JavaScript (Web) SDK Loader Script configuration</a>, if you need to optimize the loading of your web page or resolve loading errors.</p>
<p><span class="mx-imgBorder">
<a href="media/javascript-sdk/sdk-loader-script-configuration.png#lightbox" data-linktype="relative-path">
<img src="media/javascript-sdk/sdk-loader-script-configuration.png" alt="Screenshot of the JavaScript (Web) SDK Loader Script. The parameters for configuring the JavaScript (Web) SDK Loader Script are highlighted." data-linktype="relative-path">
</a>
</span>
</p>
</li>
</ol>
<h4 id="javascript-web-sdk-loader-script-configuration">JavaScript (Web) SDK Loader Script configuration</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Required?</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>src</td>
<td>string</td>
<td>Required</td>
<td>The full URL for where to load the SDK from. This value is used for the "src" attribute of a dynamically added &lt;script /&gt; tag. You can use the public CDN location or your own privately hosted one.</td>
</tr>
<tr>
<td>name</td>
<td>string</td>
<td>Optional</td>
<td>The global name for the initialized SDK. Use this setting if you need to initialize two different SDKs at the same time.<br><br>The default value is appInsights, so <code>window.appInsights</code> is a reference to the initialized instance.<br><br> Note: If you assign a name value or if a previous instance is assigned to the global name appInsightsSDK, the SDK initialization code requires it to be in the global namespace as <code>window.appInsightsSDK=&lt;name value&gt;</code> to ensure the correct JavaScript (Web) SDK Loader Script skeleton, and proxy methods are initialized and updated.</td>
</tr>
<tr>
<td>ld</td>
<td>number in ms</td>
<td>Optional</td>
<td>Defines the load delay to wait before attempting to load the SDK. Use this setting when the HTML page is failing to load because the JavaScript (Web) SDK Loader Script is loading at the wrong time.<br><br>The default value is 0ms after timeout. If you use a negative value, the script tag is immediately added to the <code>&lt;head&gt;</code> region of the page and blocks the page load event until the script is loaded or fails.</td>
</tr>
<tr>
<td>useXhr</td>
<td>boolean</td>
<td>Optional</td>
<td>This setting is used only for reporting SDK load failures. For example, this setting is useful when the JavaScript (Web) SDK Loader Script is preventing the HTML page from loading, causing fetch() to be unavailable.<br><br>Reporting first attempts to use fetch() if available and then fallback to XHR. Set this setting to <code>true</code> to bypass the fetch check. This setting is necessary only in environments where fetch can't transmit failure events, for example, when the JavaScript (Web) SDK Loader Script fails to load successfully.</td>
</tr>
<tr>
<td>crossOrigin</td>
<td>string</td>
<td>Optional</td>
<td>By including this setting, the script tag added to download the SDK includes the crossOrigin attribute with this string value. Use this setting when you need to provide support for CORS. When not defined (the default), no crossOrigin attribute is added. Recommended values aren't defined (the default), "", or "anonymous". For all valid values, see the <a href="https://developer.mozilla.org/docs/Web/HTML/Attributes/crossorigin" data-linktype="external">cross origin HTML attribute</a> documentation.</td>
</tr>
<tr>
<td>onInit</td>
<td>function(aiSdk) { ... }</td>
<td>Optional</td>
<td>This callback function is called after the main SDK script is successfully loaded and initialized from the CDN (based on the src value). This callback function is useful when you need to insert a telemetry initializer. It's passed one argument, which is a reference to the SDK instance that's being called for and is also called before the first initial page view. If the SDK is already loaded and initialized, this callback is still called. NOTE: During the processing of the sdk.queue array, this callback is called. You can't add any more items to the queue because they're ignored and dropped. (Added as part of JavaScript (Web) SDK Loader Script version 5--the sv:"5" value within the script).</td>
</tr>
<tr>
<td>cr</td>
<td>boolean</td>
<td>Optional</td>
<td>If the SDK fails to load and the endpoint value defined for <code>src</code> is the public CDN location, this configuration option attempts to immediately load the SDK from one of the following backup CDN endpoints:<ul><li>js.monitor.azure.com</li><li>js.cdn.applicationinsights.io</li><li>js.cdn.monitor.azure.com</li><li>js0.cdn.applicationinsights.io</li><li>js0.cdn.monitor.azure.com</li><li>js2.cdn.applicationinsights.io</li><li>js2.cdn.monitor.azure.com</li><li>az416426.vo.msecnd.net</li></ul>NOTE: az416426.vo.msecnd.net is partially supported, so it's not recommended.<br><br>If the SDK successfully loads from a backup CDN endpoint, it loads from the first available one, which is determined when the server performs a successful load check. If the SDK fails to load from any of the backup CDN endpoints, the SDK Failure error message appears.<br><br>When not defined, the default value is <code>true</code>. If you don’t want to load the SDK from the backup CDN endpoints, set this configuration option to <code>false</code>.<br><br>If you’re loading the SDK from your own privately hosted CDN endpoint, this configuration option isn't applicable.</td>
</tr>
</tbody>
</table>
</section>
<section id="tabpanel_1_npmpackage" role="tabpanel" data-tab="npmpackage" aria-hidden="true" hidden="hidden">

<ol>
<li><p>Use the following command to install the Microsoft Application Insights JavaScript SDK - Web package.</p>
<pre><code class="lang-sh">npm i --save @microsoft/applicationinsights-web
</code></pre>
<p><em>Typings are included with this package</em>, so you <em>don't</em> need to install a separate typings package.</p>
</li>
<li><p>Add the following JavaScript to your application's code.</p>
<p>Where and also how you add this JavaScript code depends on your application code. For example, you might be able to add it exactly as it appears below or you may need to create wrappers around it.</p>
<pre><code class="lang-js">import { ApplicationInsights } from '@microsoft/applicationinsights-web'

const appInsights = new ApplicationInsights({ config: {
  connectionString: 'YOUR_CONNECTION_STRING'
  /* ...Other Configuration Options... */
} });
appInsights.loadAppInsights();
appInsights.trackPageView();
</code></pre>
</li>
</ol>
</section>
</div>
<h3 id="paste-the-connection-string-in-your-environment">Paste the connection string in your environment</h3>
<p>To paste the connection string in your environment, follow these steps:</p>
<ol>
<li><p>Navigate to the <strong>Overview</strong> pane of your Application Insights resource.</p>
</li>
<li><p>Locate the <strong>Connection String</strong>.</p>
</li>
<li><p>Select the <strong>Copy to clipboard</strong> icon to copy the connection string to the clipboard.</p>
<p><span class="mx-imgBorder">
<a href="media/migrate-from-instrumentation-keys-to-connection-strings/migrate-from-instrumentation-keys-to-connection-strings.png#lightbox" data-linktype="relative-path">
<img src="media/migrate-from-instrumentation-keys-to-connection-strings/migrate-from-instrumentation-keys-to-connection-strings.png" alt="Screenshot that shows Application Insights overview and connection string." data-linktype="relative-path">
</a>
</span>
</p>
</li>
<li><p>Replace the placeholder <code>"YOUR_CONNECTION_STRING"</code> in the JavaScript code with your <a href="connection-strings" data-linktype="relative-path">connection string</a> copied to the clipboard.</p>
<p>The <code>connectionString</code> format must follow "InstrumentationKey=xxxx;....". If the string provided doesn't meet this format, the SDK load process fails.</p>
<p>The connection string isn't considered a security token or key. For more information, see <a href="connection-strings#do-new-azure-regions-require-the-use-of-connection-strings" data-linktype="relative-path">Do new Azure regions require the use of connection strings?</a>.</p>
<div class="NOTE">
<p>Note</p>
<p>The Application Insights JavaScript SDK requires the connection string to be passed in during initialization and configuration. It's viewable in plain text in client browsers. There's no easy way to use the <a href="azure-ad-authentication#microsoft-entra-authentication-for-application-insights" data-linktype="relative-path">Microsoft Entra ID-based authentication</a> for browser telemetry. We recommend that you consider creating a separate Application Insights resource for browser telemetry if you need to secure the service telemetry.</p>
</div>
</li>
</ol>
<h3 id="optional-add-sdk-configuration">(Optional) Add SDK configuration</h3>
<p>The optional <a href="javascript-sdk-configuration#sdk-configuration" data-linktype="relative-path">SDK configuration</a> is passed to the Application Insights JavaScript SDK during initialization.</p>
<p>To add SDK configuration, add each configuration option directly under <code>connectionString</code>. For example:</p>
<p><span class="mx-imgBorder">
<a href="media/javascript-sdk/example-sdk-configuration.png#lightbox" data-linktype="relative-path">
<img src="media/javascript-sdk/example-sdk-configuration.png" alt="Screenshot of JavaScript code with SDK configuration options added and highlighted." data-linktype="relative-path">
</a>
</span>
</p>
<h3 id="optional-add-advanced-sdk-configuration">(Optional) Add advanced SDK configuration</h3>
<p>If you want to use the extra features provided by plugins for specific frameworks and optionally enable the Click Analytics plug-in, see:</p>
<ul>
<li><a href="javascript-framework-extensions?tabs=react" data-linktype="relative-path">React plugin</a></li>
<li><a href="javascript-framework-extensions?tabs=reactnative" data-linktype="relative-path">React native plugin</a></li>
<li><a href="javascript-framework-extensions?tabs=angular" data-linktype="relative-path">Angular plugin</a></li>
</ul>
<h3 id="confirm-data-is-flowing">Confirm data is flowing</h3>
<ol>
<li><p>Go to your Application Insights resource that you enabled the SDK for.</p>
</li>
<li><p>In the Application Insights resource menu on the left, under <strong>Investigate</strong>, select the <strong>Transaction search</strong> pane.</p>
</li>
<li><p>Open the <strong>Event types</strong> dropdown menu and select <strong>Select all</strong> to clear the checkboxes in the menu.</p>
</li>
<li><p>From the <strong>Event types</strong> dropdown menu, select:</p>
<ul>
<li><strong>Page View</strong> for Azure Monitor Application Insights Real User Monitoring</li>
<li><strong>Custom Event</strong> for the Click Analytics Auto-Collection plug-in.</li>
</ul>
<p>It might take a few minutes for data to show up in the portal. If the only data you see showing up is a load failure exception, see <a href="/en-us/troubleshoot/azure/azure-monitor/app-insights/javascript-sdk-troubleshooting#troubleshoot-sdk-load-failure-for-javascript-web-apps" data-linktype="absolute-path">Troubleshoot SDK load failure for JavaScript web apps</a>.</p>
<p>In some cases, if multiple instances of different versions of Application Insights are running on the same page, errors can occur during initialization. For these cases and the error message that appears, see <a href="https://github.com/microsoft/ApplicationInsights-JS/blob/main/versionConflict.md" data-linktype="external">Running multiple versions of the Application Insights JavaScript SDK in one session</a>. If you encounter one of these errors, try changing the namespace by using the <code>name</code> setting. For more information, see <a href="#javascript-web-sdk-loader-script-configuration" data-linktype="self-bookmark">JavaScript (Web) SDK Loader Script configuration</a>.</p>
<p><span class="mx-imgBorder">
<a href="media/javascript-sdk/confirm-data-flowing.png#lightbox" data-linktype="relative-path">
<img src="media/javascript-sdk/confirm-data-flowing.png" alt="Screenshot of the Application Insights Transaction search pane in the Azure portal with the Page View option selected. The page views are highlighted." data-linktype="relative-path">
</a>
</span>
</p>
</li>
<li><p>If you want to query data to confirm data is flowing:</p>
<ol>
<li><p>Select <strong>Logs</strong> in the left pane.</p>
<p>When you select Logs, the <a href="../logs/queries#queries-dialog" data-linktype="relative-path">Queries dialog</a> opens, which contains sample queries relevant to your data.</p>
</li>
<li><p>Select <strong>Run</strong> for the sample query you want to run.</p>
</li>
<li><p>If needed, you can update the sample query or write a new query by using <a href="/en-us/azure/data-explorer/kusto/query/" data-linktype="absolute-path">Kusto Query Language (KQL)</a>.</p>
<p>For essential KQL operators, see <a href="/en-us/azure/data-explorer/kusto/query/tutorials/learn-common-operators" data-linktype="absolute-path">Learn common KQL operators</a>.</p>
</li>
</ol>
</li>
</ol>
<h2 id="frequently-asked-questions">Frequently asked questions</h2>
<p>This section provides answers to common questions.</p>
<h3 id="what-are-the-user-and-session-counts">What are the user and session counts?</h3>
<ul>
<li>The JavaScript SDK sets a user cookie on the web client, to identify returning users, and a session cookie to group activities.</li>
<li>If there's no client-side script, you can <a href="https://apmtips.com/posts/2016-07-09-tracking-users-in-api-apps/" data-linktype="external">set cookies at the server</a>.</li>
<li>If one real user uses your site in different browsers, or by using in-private/incognito browsing, or different machines, they're counted more than once.</li>
<li>To identify a signed-in user across machines and browsers, add a call to <a href="api-custom-events-metrics#authenticated-users" data-linktype="relative-path">setAuthenticatedUserContext()</a>.</li>
</ul>
<h3 id="what-is-the-javascript-sdk-performanceoverhead">What is the JavaScript SDK performance/overhead?</h3>
<p>The Application Insights JavaScript SDK has a minimal overhead on your website. At just 36 KB gzipped, and taking only ~15 ms to initialize, the SDK adds a negligible amount of load time to your website. The minimal components of the library are quickly loaded when you use the SDK, and the full script is downloaded in the background.</p>
<p>Additionally, while the script is downloading from the CDN, all tracking of your page is queued, so you don't lose any telemetry during the entire life cycle of your page. This setup process provides your page with a seamless analytics system that's invisible to your users.</p>
<h3 id="what-browsers-are-supported-by-the-javascript-sdk">What browsers are supported by the JavaScript SDK?</h3>
<table>
<thead>
<tr>
<th><span class="mx-imgBorder">
<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" data-linktype="external">
</span>
</th>
<th><span class="mx-imgBorder">
<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" data-linktype="external">
</span>
</th>
<th><span class="mx-imgBorder">
<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE" data-linktype="external">
</span>
</th>
<th><span class="mx-imgBorder">
<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" data-linktype="external">
</span>
</th>
<th><span class="mx-imgBorder">
<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" data-linktype="external">
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>Chrome Latest βœ”</td>
<td>Firefox Latest βœ”</td>
<td>v3.x: IE 9+ &amp; Microsoft Edge βœ”<br>v2.x: IE 8+ Compatible &amp; Microsoft Edge βœ”</td>
<td>Opera Latest βœ”</td>
<td>Safari Latest βœ”</td>
</tr>
</tbody>
</table>
<h3 id="where-can-i-find-code-examples-for-the-javascript-sdk">Where can I find code examples for the JavaScript SDK?</h3>
<p>For runnable examples, see <a href="https://github.com/microsoft/ApplicationInsights-JS/tree/master/examples" data-linktype="external">Application Insights JavaScript SDK samples</a>.</p>
<h3 id="what-is-the-es3internet-explorer-8-compatibility-with-the-javascript-sdk">What is the ES3/Internet Explorer 8 compatibility with the JavaScript SDK?</h3>
<p>We need to take necessary measures to ensure that this SDK continues to "work" and doesn't break the JavaScript execution when loaded by an older browser. It would be ideal to not support older browsers, but numerous large customers can't control which browser their users choose to use.</p>
<p>This statement doesn't mean that we only support the lowest common set of features. We need to maintain ES3 code compatibility. New features need to be added in a manner that wouldn't break ES3 JavaScript parsing and added as an optional feature.</p>
<p>See GitHub for full details on <a href="https://github.com/Microsoft/ApplicationInsights-JS#es3ie8-compatibility" data-linktype="external">Internet Explorer 8 support</a>.</p>
<h3 id="is-the-javascript-sdk-open-source">Is the JavaScript SDK open-source?</h3>
<p>Yes, the Application Insights JavaScript SDK is open source. To view the source code or to contribute to the project, see the <a href="https://github.com/Microsoft/ApplicationInsights-JS" data-linktype="external">official GitHub repository</a>.</p>
<h2 id="support">Support</h2>
<ul>
<li>If you can't run the application or you aren't getting data as expected, see the dedicated <a href="/en-us/troubleshoot/azure/azure-monitor/app-insights/javascript-sdk-troubleshooting" data-linktype="absolute-path">troubleshooting article</a>.</li>
<li>For common question about the JavaScript SDK, see the <a href="#frequently-asked-questions" data-linktype="self-bookmark">FAQ</a>.</li>
<li>For Azure support issues, open an <a href="https://azure.microsoft.com/support/create-ticket/" data-linktype="external">Azure support ticket</a>.</li>
<li>For a list of open issues related to the Application Insights JavaScript SDK, see the <a href="https://github.com/microsoft/ApplicationInsights-JS/issues" data-linktype="external">GitHub Issues Page</a>.</li>
<li>Use the <a href="https://github.com/microsoft/ApplicationInsights-JS/tree/master/tools/chrome-debug-extension" data-linktype="external">Telemetry Viewer extension</a> to list out the individual events in the network payload and monitor the internal calls within Application Insights.</li>
</ul>
<h2 id="next-steps">Next steps</h2>
<ul>
<li><a href="usage" data-linktype="relative-path">Explore Application Insights usage experiences</a></li>
<li><a href="api-custom-events-metrics#page-views" data-linktype="relative-path">Track page views</a></li>
<li><a href="api-custom-events-metrics" data-linktype="relative-path">Track custom events and metrics</a></li>
<li><a href="api-filtering-sampling#javascript-telemetry-initializers" data-linktype="relative-path">Insert a JavaScript telemetry initializer</a></li>
<li><a href="javascript-sdk-configuration" data-linktype="relative-path">Add JavaScript SDK configuration</a></li>
<li>See the detailed <a href="https://github.com/microsoft/ApplicationInsights-JS/releases" data-linktype="external">release notes</a> on GitHub for updates and bug fixes.</li>
<li><a href="../logs/log-query-overview" data-linktype="relative-path">Query data in Log Analytics</a>.</li>
</ul>
</div><div id="ms--inline-notifications" class="margin-block-xs" data-bi-name="inline-notification"></div><div id="assertive-live-region" role="alert" aria-live="assertive" class="visually-hidden" aria-relevant="additions" aria-atomic="true"></div>
							<div id="polite-live-region" role="status" aria-live="polite" class="visually-hidden" aria-relevant="additions" aria-atomic="true"></div>
							<!-- </content> -->

						</main><!-- recommendations section --><!-- end recommendations section -->

						<!-- feedback section --><section id="site-user-feedback-footer" class="font-size-sm margin-top-md" data-test-id="site-user-feedback-footer" data-bi-name="site-feedback-section">
	<hr class="hr" />
	<h2 id="feedback" class="title is-3">Feedback</h2>
	<div class="display-flex flex-wrap-wrap align-items-center">
		<p class="font-weight-semibold margin-xxs margin-left-none">Was this page helpful?</p>
		<div class="buttons">
			<button
				class="thumb-rating-button like button button-primary button-sm"
				data-test-id="footer-rating-yes"
				data-binary-rating-response="rating-yes"
				type="button"
				title="This article is helpful"
				data-bi-name="button-rating-yes"
				aria-pressed="false"
			>
				<span class="icon" aria-hidden="true">
					<span class="docon docon-like"></span>
				</span>
				<span>Yes</span>
			</button>
			<button
				class="thumb-rating-button dislike button button-primary button-sm"
				data-test-id="footer-rating-no"
				data-binary-rating-response="rating-no"
				type="button"
				title="This article is not helpful"
				data-bi-name="button-rating-no"
				aria-pressed="false"
			>
				<span class="icon" aria-hidden="true">
					<span class="docon docon-dislike"></span>
				</span>
				<span>No</span>
			</button>
		</div>
	</div><div class="display-flex flex-wrap-wrap margin-top-xxs"><div>
			<a
				data-bi-name="provide-feedback-cta"
				class="has-external-link-indicator"
				href="https://feedback.azure.com/d365community/forum/3887dc70-2025-ec11-b6e6-000d3a4f09d0"
				data-bi-name="product-feedback"
			>
				<span>Provide product feedback</span>
			</a><span class="margin-inline-xxs" aria-hidden="true">|</span></div><a href="https://learn.microsoft.com/answers/tags/20/azure-monitor/" class="has-external-link-indicator" data-bi-name="get-help-at-qna">
			<span>Get help at Microsoft Q&A</span>
		</a></div>

</section><!-- end feedback section -->

						<!-- feedback report section --><!-- end feedback report section --><aside
								id="ms--additional-resources-mobile"
								aria-label="Additional resources"
								class="display-none-desktop display-none-print"
							>
								<hr class="hr" hidden />
								<h2 id="ms--additional-resources-mobile-heading" class="title is-3" hidden>Additional resources</h2>
								<section id="right-rail-recommendations-mobile" data-bi-name="recommendations" hidden></section>
								<section id="right-rail-training-mobile" data-bi-name="learning-resources-card" hidden></section>
								<section id="right-rail-events-mobile" data-bi-name="events-card" hidden></section>
								<section id="right-rail-qna-mobile" data-bi-name="qna-link-card" hidden></section>
							</aside><div class="border-top is-visible-interactive has-default-focus margin-top-sm "><footer id="footer-interactive" data-bi-name="footer" class="footer-layout"><div class="display-flex gap-xs flex-wrap-wrap is-full-height padding-right-lg-desktop"><a
				data-mscc-ic="false"
				class="locale-selector-link button button-sm button-clear flex-shrink-0"
				href="#"
				data-bi-name="select-locale">
					<span class="icon" aria-hidden="true">
						<span class="docon docon-world"></span>
					</span>
					<span class="local-selector-link-text"></span></a><div class="ccpa-privacy-link" data-ccpa-privacy-link hidden>
<a
	href="https://aka.ms/yourcaliforniaprivacychoices"
	class="button button-sm button-clear flex-shrink-0"
	data-mscc-ic="false"
	data-bi-name="your-privacy-choices"
>
	<svg
		role="img"
		aria-label="California Consumer Privacy Act (CCPA) Opt-Out Icon"
		xmlns="http://www.w3.org/2000/svg"
		viewBox="0 0 30 14"
		xml:space="preserve"
		height="16"
		width="43"
		focusable="false"
	>
		<title>California Consumer Privacy Act (CCPA) Opt-Out Icon</title>
		<path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff"></path>
		<path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#06f"></path>
		<path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill:#fff"></path>
		<path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill:#06f"></path>
	</svg>
	<span>Your Privacy Choices</span>
</a>

		</div>
		<div class="flex-shrink-0">
<div class="dropdown has-caret-up">
	<button class="dropdown-trigger button button-clear button-sm has-inner-focus theme-dropdown-trigger"
		aria-controls="theme-menu-interactive" aria-expanded="false" title="Theme" data-bi-name="theme">
		<span class="icon">
			<span class="docon docon-sun" aria-hidden="true"></span>
		</span>
		<span>Theme</span>
		<span class="icon expanded-indicator" aria-hidden="true">
			<span class="docon docon-chevron-down-light"></span>
		</span>
	</button>
	<div class="dropdown-menu" id="theme-menu-interactive" role="menu">
		<ul class="theme-selector padding-xxs" role="none">
			<li class="theme display-block" role="menuitem">
				<button class="button button-clear button-sm theme-control button-block justify-content-flex-start"
					data-theme-to="light">
					<span class="theme-light margin-right-xxs">
						<span
							class="theme-selector-icon border display-inline-block has-body-background"
							aria-hidden="true">
							<svg class="svg" xmlns="http://www.w3.org/2000/svg"
								viewBox="0 0 22 14">
								<rect width="22" height="14" class="has-fill-body-background" />
								<rect x="5" y="5" width="12" height="4" class="has-fill-secondary" />
								<rect x="5" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="8" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="11" y="2" width="3" height="1" class="has-fill-secondary" />
								<rect x="1" y="1" width="2" height="2" class="has-fill-secondary" />
								<rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" />
								<rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" />
							</svg>
						</span>
					</span>
					<span>Light</span>
				</button>
			</li>
			<li class="theme display-block" role="menuitem">
				<button class="button button-clear button-sm theme-control button-block justify-content-flex-start"
					data-theme-to="dark">
					<span class="theme-dark margin-right-xxs">
						<span
							class="border theme-selector-icon display-inline-block has-body-background"
							aria-hidden="true">
							<svg class="svg" xmlns="http://www.w3.org/2000/svg"
								viewBox="0 0 22 14">
								<rect width="22" height="14" class="has-fill-body-background" />
								<rect x="5" y="5" width="12" height="4" class="has-fill-secondary" />
								<rect x="5" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="8" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="11" y="2" width="3" height="1" class="has-fill-secondary" />
								<rect x="1" y="1" width="2" height="2" class="has-fill-secondary" />
								<rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" />
								<rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" />
							</svg>
						</span>
					</span>
					<span>Dark</span>
				</button>
			</li>
			<li class="theme display-block" role="menuitem">
				<button class="button button-clear button-sm theme-control button-block justify-content-flex-start"
					data-theme-to="high-contrast">
					<span class="theme-high-contrast margin-right-xxs">
						<span
							class="border theme-selector-icon display-inline-block has-body-background"
							aria-hidden="true">
							<svg class="svg" xmlns="http://www.w3.org/2000/svg"
								viewBox="0 0 22 14">
								<rect width="22" height="14" class="has-fill-body-background" />
								<rect x="5" y="5" width="12" height="4" class="has-fill-secondary" />
								<rect x="5" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="8" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="11" y="2" width="3" height="1" class="has-fill-secondary" />
								<rect x="1" y="1" width="2" height="2" class="has-fill-secondary" />
								<rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" />
								<rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" />
							</svg>
						</span>
					</span>
					<span>High contrast</span>
				</button>
			</li>
		</ul>
	</div>
</div>

		</div>
	</div>
	<ul class="links" data-bi-name="footerlinks">
		<li class="manage-cookies-holder" hidden></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/previous-versions/" data-bi-name="archivelink">Previous Versions</a></li>
				<li><a class="external-link-indicator" data-mscc-ic="false" href="https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog" data-bi-name="bloglink">Blog</a></li>
				<li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/contribute/" data-bi-name="contributorGuide">Contribute</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://go.microsoft.com/fwlink/?LinkId=521839" data-bi-name="privacy">Privacy</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/legal/termsofuse" data-bi-name="termsofuse">Terms of Use</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://www.microsoft.com/legal/intellectualproperty/Trademarks/" data-bi-name="trademarks">Trademarks</a></li><li>&copy; Microsoft 2024</li>
	</ul>
</footer></div></div><div
							id="ms--additional-resources"
							class="right-container column is-4-desktop display-none display-block-desktop"
							data-bi-name="pageactions"
							role="complementary"
							aria-label="Additional resources"
						>
							<div id="affixed-right-container" class="margin-top-sm-tablet" data-bi-name="right-column">
								<h2 id="ms--additional-resources-heading" class="title is-6 margin-top-md" hidden>Additional resources</h2>
								<section id="right-rail-events" data-bi-name="events-card" hidden></section>
								<section id="right-rail-training" data-bi-name="learning-resources-card" hidden></section>
								<section id="right-rail-recommendations" data-bi-name="recommendations" hidden></section>
								<nav id="side-doc-outline" class="doc-outline" data-bi-name="intopic toc" aria-label="In this article">
									<h3>In this article</h3>
								</nav>
								<section id="right-rail-qna" class="margin-top-xxs" data-bi-name="qna-link-card" hidden></section>
							</div>
						</div></div>
				<!--end of div.columns -->

			</section>
			<!--end of .primary-holder -->

			<!-- interactive container -->
			<aside id="interactive-container" class="interactive-container is-visible-interactive column has-body-background-dark ">
			</aside>
			<!-- end of interactive container -->
		</div>

	</div>
	<!--end of .mainContainer -->

	<section class="border-top has-default-focus is-hidden-interactive margin-top-sm "><footer id="footer" data-bi-name="footer" class="footer-layout uhf-container has-padding" role="contentinfo"><div class="display-flex gap-xs flex-wrap-wrap is-full-height padding-right-lg-desktop"><a
				data-mscc-ic="false"
				class="locale-selector-link button button-sm button-clear flex-shrink-0"
				href="#"
				data-bi-name="select-locale">
					<span class="icon" aria-hidden="true">
						<span class="docon docon-world"></span>
					</span>
					<span class="local-selector-link-text"></span></a><div class="ccpa-privacy-link" data-ccpa-privacy-link hidden>
<a
	href="https://aka.ms/yourcaliforniaprivacychoices"
	class="button button-sm button-clear flex-shrink-0"
	data-mscc-ic="false"
	data-bi-name="your-privacy-choices"
>
	<svg
		role="img"
		aria-label="California Consumer Privacy Act (CCPA) Opt-Out Icon"
		xmlns="http://www.w3.org/2000/svg"
		viewBox="0 0 30 14"
		xml:space="preserve"
		height="16"
		width="43"
		focusable="false"
	>
		<title>California Consumer Privacy Act (CCPA) Opt-Out Icon</title>
		<path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff"></path>
		<path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#06f"></path>
		<path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill:#fff"></path>
		<path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill:#06f"></path>
	</svg>
	<span>Your Privacy Choices</span>
</a>

		</div>
		<div class="flex-shrink-0">
<div class="dropdown has-caret-up">
	<button class="dropdown-trigger button button-clear button-sm has-inner-focus theme-dropdown-trigger"
		aria-controls="theme-menu" aria-expanded="false" title="Theme" data-bi-name="theme">
		<span class="icon">
			<span class="docon docon-sun" aria-hidden="true"></span>
		</span>
		<span>Theme</span>
		<span class="icon expanded-indicator" aria-hidden="true">
			<span class="docon docon-chevron-down-light"></span>
		</span>
	</button>
	<div class="dropdown-menu" id="theme-menu" role="menu">
		<ul class="theme-selector padding-xxs" role="none">
			<li class="theme display-block" role="menuitem">
				<button class="button button-clear button-sm theme-control button-block justify-content-flex-start"
					data-theme-to="light">
					<span class="theme-light margin-right-xxs">
						<span
							class="theme-selector-icon border display-inline-block has-body-background"
							aria-hidden="true">
							<svg class="svg" xmlns="http://www.w3.org/2000/svg"
								viewBox="0 0 22 14">
								<rect width="22" height="14" class="has-fill-body-background" />
								<rect x="5" y="5" width="12" height="4" class="has-fill-secondary" />
								<rect x="5" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="8" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="11" y="2" width="3" height="1" class="has-fill-secondary" />
								<rect x="1" y="1" width="2" height="2" class="has-fill-secondary" />
								<rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" />
								<rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" />
							</svg>
						</span>
					</span>
					<span>Light</span>
				</button>
			</li>
			<li class="theme display-block" role="menuitem">
				<button class="button button-clear button-sm theme-control button-block justify-content-flex-start"
					data-theme-to="dark">
					<span class="theme-dark margin-right-xxs">
						<span
							class="border theme-selector-icon display-inline-block has-body-background"
							aria-hidden="true">
							<svg class="svg" xmlns="http://www.w3.org/2000/svg"
								viewBox="0 0 22 14">
								<rect width="22" height="14" class="has-fill-body-background" />
								<rect x="5" y="5" width="12" height="4" class="has-fill-secondary" />
								<rect x="5" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="8" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="11" y="2" width="3" height="1" class="has-fill-secondary" />
								<rect x="1" y="1" width="2" height="2" class="has-fill-secondary" />
								<rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" />
								<rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" />
							</svg>
						</span>
					</span>
					<span>Dark</span>
				</button>
			</li>
			<li class="theme display-block" role="menuitem">
				<button class="button button-clear button-sm theme-control button-block justify-content-flex-start"
					data-theme-to="high-contrast">
					<span class="theme-high-contrast margin-right-xxs">
						<span
							class="border theme-selector-icon display-inline-block has-body-background"
							aria-hidden="true">
							<svg class="svg" xmlns="http://www.w3.org/2000/svg"
								viewBox="0 0 22 14">
								<rect width="22" height="14" class="has-fill-body-background" />
								<rect x="5" y="5" width="12" height="4" class="has-fill-secondary" />
								<rect x="5" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="8" y="2" width="2" height="1" class="has-fill-secondary" />
								<rect x="11" y="2" width="3" height="1" class="has-fill-secondary" />
								<rect x="1" y="1" width="2" height="2" class="has-fill-secondary" />
								<rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" />
								<rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" />
							</svg>
						</span>
					</span>
					<span>High contrast</span>
				</button>
			</li>
		</ul>
	</div>
</div>

		</div>
	</div>
	<ul class="links" data-bi-name="footerlinks">
		<li class="manage-cookies-holder" hidden></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/previous-versions/" data-bi-name="archivelink">Previous Versions</a></li>
				<li><a class="external-link-indicator" data-mscc-ic="false" href="https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog" data-bi-name="bloglink">Blog</a></li>
				<li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/contribute/" data-bi-name="contributorGuide">Contribute</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://go.microsoft.com/fwlink/?LinkId=521839" data-bi-name="privacy">Privacy</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/legal/termsofuse" data-bi-name="termsofuse">Terms of Use</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://www.microsoft.com/legal/intellectualproperty/Trademarks/" data-bi-name="trademarks">Trademarks</a></li><li>&copy; Microsoft 2024</li>
	</ul>
</footer>

	</section>

	<div id="action-panel" role="region" aria-label="Action Panel" class="action-panel has-default-focus" tabindex="-1"></div>
</body>
</html>