Blog

Consolidate your data with Azure App Insights + Power BI

March 14, 2024 by Jeppe Basse

As an integral part of Microsoft's Azure services, Microsoft App Insights is a tool that we have increasingly started to use as an alternative to, for example, Google Analytics, which historically has been a very popular tracking and monitoring tool.

Where we can see that App Insights really adds a lot of value is with the Microsoft tech stack, where tracking can be done directly with Azure services such as Azure Monitor, Azure DevOps, and Visual Studio - but also where reporting can be set up with Power BI directly from the application. It can thus be integrated with other monitoring tools across the organization in a single overview where traffic data can be combined with other data sources.

With Microsoft App Insights, you typically get "a little less out of the box" than with more standardized statistics and monitoring programs. You get a basic setup, and from there, you define directly from the code what you want to track via the App Insights SDK. Conversely, App Insights allows for much more customized tracking, where developers can define precisely what data they want to collect and how it should be structured. This is particularly interesting if you are building custom web applications, customer portals, native/hybrid apps for iOS/Android, where standard web statistics often will be deficient or not fit for purpose.

Google Analytics and other classic tracking tools typically use JavaScript tracking code independently of the application layer. This code collects data about user interactions that can be tracked in the rendering layer. Due to the cookie directive, this practically requires that the user gives permission through cookie consent, for example, Cookiebot or Cookieinformation, and since many users only agree to "Necessary" or "Technical" cookies, these classic cookie-based tracking tools often provide a very skewed picture of visitor numbers.

Graph

App Insights, GDPR, and the EU Cookie Directive

Microsoft Azure Application Insights also uses cookies as part of its functionality. These cookies can be used for various purposes, such as tracking user interactions across multiple sessions (session management). Cookies can help identify unique users and track their activities and preferences within an application. They can collect data on how users interact with an application to evaluate performance and errors. Cookies can also be used to collect anonymous data about visitors' behavior on a website or application to understand how it is used and improve its functionality.

The use of cookies in Azure Application Insights is, of course, subject to applicable privacy laws, including the EU's Cookie Directive and GDPR. This means that Microsoft provides the tools and guidelines to help implement and manage the use of cookies. However, it also means that in the implementation, you are responsible for implementing the necessary anonymization of data, and in App Insights, you have full control over what is collected. In third-party analytics systems, it may be a bit more unclear where data is placed, what is tracked, and there is typically limited customization options.

"Since you have full control over the data collection in App Insights, it is possible here to use anonymized or pseudonymized data instead of directly identifiable information."
Jeppe Basse

Therefore, with App Insights, one can ensure, as with the rest of the application architecture, that data collection and processing serve legitimate purposes. This avoids unnecessary or sensitive personal data being collected. Since you have full control over data collection in App Insights, it is possible to use anonymized or pseudonymized data instead of directly identifiable information. This reduces the risk and complexity of handling personal data and adheres to the principle of privacy by design as a standard practice, in alignment and within the same environment as the rest of the application.

Opportunity to Enhance Reporting and Visualize Data in Power BI

If your organization has already chosen the Microsoft ecosystem, leveraging App Insights can provide seamless integration with other Azure services such as Azure Monitor, Azure DevOps, and Visual Studio. This integration facilitates collaboration between development and operations teams and can provide a more cohesive monitoring and administration experience across your Azure-hosted applications and services.

App Insights allows you to create custom dashboards, charts, and reports tailored to your specific monitoring and analysis needs - and we often integrate it with Power BI where data is collected from the application and combined with data from other sources. This opens up virtually unlimited opportunities for ongoing customization and optimization as you gain insights or as needs evolve.

Similarly, it's possible to grant limited rights and create specific Power BI dashboards depending on one's role and the data they are allowed to directly access through rights associated with their Office 365 user. Having data access through the central Office 365 single sign-on simplifies role assignment and ensures that data access is centrally controlled through the same security model. Since an Office 365 user can simply be removed centrally, and thus no longer has access to either application areas or data, your data is much better protected.