Rafael Rafael - 1 month ago 17
ASP.NET (C#) Question

Getting User Information in App Insights

I have a web forms application.

I have integrated the App Insights SDK, I receive the notifications about the application like button click (through Custom Events, Track Event function) on my Azure portal.

How can I get user information like:

What regions/geography the user is logging from, which browser is he/she accessing through... things like that.

Right now, In Azure Portal under Usage--> Ussers

I get:

No data for 'users' with values of 'Country or region'.


Similarly, no data messages are there for sessions and page views even though for a Custom event (Button click), I am getting the metrics.

Please explain.

Thanks.

Answer

How can I get user information like:

What regions/geography the user is logging from, which browser is he/she accessing through... things like that.

According to your description, I do a test to configure the chart under Application Insights > Overview > Metrics Explorer, and select the metrics and group metrics by Browser version or Country or region.

enter image description here

I set Chart type to Grid, and select Users and group by Country or region, the chart looks like this.

enter image description here

In a same way, I configure the chart to display Unique count of Users by Browser version, the chart looks like this.

enter image description here

I get:

No data for 'users' with values of 'Country or region'.

For “No data for 'users'…” issue, please make sure if you add the scripts by hand. And you could check “No data on Page Views, Browsers, Usage” section to troubleshoot no data issue.