asp.netazureorchardcms

How do I use two AI instrumentation keys for client-side tracking on the same page?


I am trying to track usage of my ASP.NET MVC web application in the Azure Application Insights but with using two different instrumentation keys. Unfortunately, it is not that simple to add the two short scripts using different variable names and instrumentation keys. The request will be sent only with the last key.

So my question is: How do I use two AI instrumentation keys for client-side tracking on the same page? I.e. how do I send client-side telemetry to two AI accounts simultaneously?


Solution

  • I copied the AI javascript code, this solved my problem.