Microsoft Application Insights
Microsoft Application Insights is an application performance monitoring service that collects browser telemetry including page views, performance metrics, exceptions and custom events via a JavaScript SDK, sending data to Azure.
What does Microsoft Application Insights do?
What is Microsoft Application Insights?
Microsoft Application Insights is the application performance monitoring feature of Azure Monitor. Its browser JavaScript SDK is embedded in a website and automatically collects telemetry covering page views, page load and AJAX performance, JavaScript exceptions and custom events. Each telemetry item is correlated to a user and a session using cookies, and the data is sent to an Azure ingestion endpoint in the region chosen during resource creation.
Data and Cookies Collected
The SDK sets three cookies by default. The ai_user cookie persists for one year and holds a randomly generated user identifier. The ai_session cookie expires after 30 minutes of inactivity and identifies the current browsing session. The ai_authUser cookie is set only when the website supplies an authenticated user identifier. Beyond cookies, the SDK collects the visitor IP address, browser user agent, screen resolution, referrer URL and the full URL of each page visited. When cookieless mode is enabled the ai_user and ai_session cookies are not set, though an in-memory session identifier is still used.
GDPR and ePrivacy Implications
Under the ePrivacy Directive, storing or reading cookies on a user's device requires prior informed consent unless the cookie is strictly necessary. The ai_user and ai_session cookies are analytics cookies and are not strictly necessary, so consent is required before the SDK initialises. Under GDPR, the IP address and telemetry constitute personal data. The legal basis for processing is consent under Article 6(1)(a). If the SDK is used to track authenticated users, additional considerations under Article 9 may apply if health or other special category data can be inferred.
Consent Requirements
Consent must be obtained before the Application Insights JavaScript snippet is executed. The SDK supports a cookieless mode and a disableCookiesUsage flag so that it can be initialised after consent is given, or run without cookies at all if the user declines analytics. Your consent management platform should block the snippet by default and release it only when the user opts in to the analytics category.
Data Transfers Outside the EU
If the Azure Monitor workspace is located in a US region, or if Microsoft support engineers access data from the United States, telemetry including IP derived geolocation and user identifiers is transferred to a third country. Microsoft relies on the EU US Data Privacy Framework and standard contractual clauses as the legal transfer mechanism. Operators should configure their Azure resource to an EU region and verify the data residency settings to minimise cross-border transfers.
Practical Compliance Steps
Block the Application Insights snippet via your consent management platform until analytics consent is granted. Configure the SDK with cookieless mode as a fallback for users who decline. Set the Azure Monitor workspace to an EU region to limit data transfers. Define a data retention period in Azure Monitor that matches your stated privacy policy. Document Application Insights in your Records of Processing Activities and update your cookie policy and privacy notice to describe the telemetry collected.
Microsoft Application Insights and the GDPR
Microsoft Application Insights is classified as “Analytics”. On a site that targets European visitors, it must only load after the visitor consents, and it must be listed in your cookie policy.
- Legal basis
- Consent under Article 6(1)(a) GDPR and Article 5(3) ePrivacy for the analytics cookies and telemetry
- Risk level
- medium
- Applicable regulations
- GDPR, ePrivacy Directive (2002/58/EC)
Impact assessment (DPIA)
A DPIA should be considered when Application Insights is used to monitor authenticated user journeys or when cross-session profiling is enabled, as telemetry including user identifiers and IP addresses may be transferred to Microsoft in the United States. Assess the volume of personal data collected, the retention period configured in Azure Monitor, and whether cookieless mode is activated to reduce risk.
Sample text for your banner
We use Microsoft Application Insights to monitor the performance of this website and to understand how you use it. Application Insights places cookies on your device and sends telemetry data including your approximate location, browser type and the pages you visit to Microsoft Azure. You can withdraw your consent at any time.
What Microsoft Application Insights sets and contacts
- Tracking method
- Azure Monitor Application Insights JavaScript SDK collecting page view, performance, exception and custom event telemetry sent to an Azure ingestion endpoint
- Server location
- European Union or United States depending on the chosen Azure region
- Cookieless mode available
- Yes
- Data transferred outside the EU
- Telemetry including IP derived geo, user and session identifiers may be processed by Microsoft Corporation in the United States depending on region and support access, under the EU US Data Privacy Framework and standard contractual clauses
Cookies set (3)
| Name | Type | Duration | Purpose |
|---|---|---|---|
| ai_user | Analytics | 1 year | Randomly generated user identifier used to correlate telemetry events to the same anonymous user across sessions |
| ai_session | Analytics | 30 minutes | Session identifier used to group telemetry events that occur within the same browsing session |
| ai_authUser | Analytics | Session | Stores the authenticated user identifier provided by the website when a logged-in user identifier is supplied to the SDK |
Third-party domains contacted (3)
js.monitor.azure.comdc.services.visualstudio.com*.in.applicationinsights.azure.com
Frequently asked questions about Microsoft Application Insights
Can't find your question? Write to us, we answer fast.
What cookies does Microsoft Application Insights set?
Application Insights sets three cookies by default. The ai_user cookie (1 year) holds a randomly generated user identifier. The ai_session cookie (30 minutes) identifies the current browsing session. The ai_authUser cookie is set only when your website supplies an authenticated user identifier. All three can be disabled using the SDK cookieless mode or the disableCookiesUsage flag.
Is consent required before loading Application Insights?
Yes. The ai_user and ai_session cookies are analytics cookies and are not strictly necessary. Under the ePrivacy Directive, consent must be obtained before those cookies are set. You should block the Application Insights snippet via your consent management platform and only release it after the user opts in to the analytics category.
What is the legal basis for processing data with Application Insights?
The legal basis is consent under Article 6(1)(a) of the GDPR for the analytics cookies and telemetry. Consent must be freely given, specific, informed and unambiguous. If you use Application Insights only for strictly necessary performance monitoring without cookies and with anonymised IP, a case for legitimate interest under Article 6(1)(f) may be arguable, but consent remains the safest basis.
Does Application Insights transfer data to the United States?
It depends on your Azure region configuration. If your Azure Monitor workspace is in a US region, or if Microsoft support staff access data from the United States, telemetry including IP-derived geolocation and user identifiers is transferred to the US. Microsoft relies on the EU US Data Privacy Framework and standard contractual clauses. To minimise transfers, configure your workspace in an EU region.
Do I need a DPIA for Microsoft Application Insights?
A DPIA is recommended if Application Insights is used to track authenticated users across sessions, if it is deployed on a high-traffic site processing large volumes of personal data, or if the Azure workspace is in a US region. The combination of persistent user identifiers, IP addresses and potential US transfers raises the risk level. If you enable cookieless mode, anonymise IPs and restrict the workspace to the EU, a DPIA may not be mandatory.
How do I implement Application Insights in a GDPR compliant way?
Block the JavaScript snippet via your consent management platform until analytics consent is granted. Use the SDK disableCookiesUsage flag or cookieless mode as a fallback for users who decline. Enable IP anonymisation in the SDK configuration. Set the Azure Monitor workspace to an EU region. Define a data retention period aligned with your privacy notice. Document Application Insights in your Records of Processing Activities.
Are there privacy-friendly alternatives to Application Insights?
Yes. Server-side analytics platforms such as Plausible Analytics, Fathom Analytics and Matomo (self-hosted) can provide performance metrics without setting persistent user cookies and with IP anonymisation by default. These reduce or eliminate the need for consent under the ePrivacy Directive and lower the risk of cross-border data transfers. Azure Monitor can also be used purely on the server side without the browser SDK.
How should I update my cookie policy for Application Insights?
Your cookie policy should list ai_user (duration 1 year, purpose analytics user identifier), ai_session (duration 30 minutes, purpose session identifier) and ai_authUser (duration session, purpose authenticated user identifier). Describe the data controller as Microsoft Corporation, the purpose as website performance monitoring, and the legal basis as consent. Reference the US data transfer safeguards if your Azure workspace is not in the EU.
OpenPanel
OpenPanel is a digital analytics solution that helps businesses measure and understand their online performance through comprehensive data collection and analysis. It provides visitor tracking, behavioral insights, and conversion metrics across websites and applications. OpenPanel supports custom event tracking, audience segmentation, and automated reporting. With intuitive dashboards and visualization tools, OpenPanel enables informed decisions that improve experience and drive results.
Genezio
genezio is an analytics and measurement platform providing deep insights into digital ecosystem performance. It tracks user interactions, measures campaign effectiveness, and identifies optimization opportunities across web and mobile. genezio offers customizable dashboards, automated alerts, and data export capabilities. By transforming raw data into actionable intelligence, genezio empowers organizations to optimize strategy and maximize return on investment.
Matomo Tag Manager
Matomo Tag Manager is a digital analytics solution that helps businesses measure and understand their online performance through comprehensive data collection and analysis. It provides visitor tracking, behavioral insights, and conversion metrics across websites and applications. Matomo Tag Manager supports custom event tracking, audience segmentation, and automated reporting. With intuitive dashboards and visualization tools, Matomo Tag Manager enables informed decisions that improve experience and drive results.
Nocodelytics
Nocodelytics is an analytics and measurement platform providing deep insights into digital ecosystem performance. It tracks user interactions, measures campaign effectiveness, and identifies optimization opportunities across web and mobile. Nocodelytics offers customizable dashboards, automated alerts, and data export capabilities. By transforming raw data into actionable intelligence, Nocodelytics empowers organizations to optimize strategy and maximize return on investment.
Podtrac
Podtrac is an analytics and measurement platform providing deep insights into digital ecosystem performance. It tracks user interactions, measures campaign effectiveness, and identifies optimization opportunities across web and mobile. Podtrac offers customizable dashboards, automated alerts, and data export capabilities. By transforming raw data into actionable intelligence, Podtrac empowers organizations to optimize strategy and maximize return on investment.
PatientLoop
PatientLoop is a digital analytics solution that helps businesses measure and understand their online performance through comprehensive data collection and analysis. It provides visitor tracking, behavioral insights, and conversion metrics across websites and applications. PatientLoop supports custom event tracking, audience segmentation, and automated reporting. With intuitive dashboards and visualization tools, PatientLoop enables informed decisions that improve experience and drive results.
Make your site compliant today.
Free up to 25,000 sessions a month. No credit card, no commitment.