How about adding a snippet about how to use app insights in the browser now that I've configured my ASP.NET Core MVC app for app insights?
Can I just use appInsights.trackEvent({ name: 'blah' }); now?
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@spottedmahn Thank you for your feedback. I'll take a look and get back to you shortly.
You are correct that the site is now setup for using the Javascript SDK and you can call methods like appInsights.trackevent(). I will assign this to the doc author to decide whether or not to add an example in addition to the linked documentation.
FYI appInsights.trackEvent({ name: 'blah' }); didn't "work". The event gets logged but the name was something like '[object object]'.
appInsights.trackEvent('blah'); does work though.
I got the first approach from here. Seems like that doc page is wrong 🚫. Thoughts?
The JS SDK Github repo has the appInsights.trackEvent({ name: 'blah' }); syntax as well, so it doesn't look like that particular doc is the problem. I'll investigate that further.
I happen to be doing some more work around this today and I re-tested.
appInsights.trackEvent({ name: 'mike d event name test' }); produces:

The API reference has been updated 👍
I opened another issue b/c I results are not lining up with the API reference: https://github.com/microsoft/ApplicationInsights-JS/issues/1101
Closing out as this article now covers all the latest config for the client side JS:https://docs.microsoft.com/azure/azure-monitor/app/javascript
great, thanks @mrbullwinkle 🤝