Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,313 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
We are monitoring our website metrics using App Insights. Is there any way to track URL referrers to this tool? Or plans to add that capability?
@Zarqa Javed (eXcell) Welcome to Microsoft Q & A Community Forum. In order to log the URL referrers, you can create Telemetry Initializer to add URL referrer to the request. Sample code for your reference.
public void Initialize(ITelemetry telemetry)
{
var requestTelemetry = telemetry as RequestTelemetry;
if (requestTelemetry != null)
{
string referrer = HttpContext.Current.Request.UrlReferrer.ToString();
telemetry.Context.Properties.Add("Referrer", referrer);
}
}
Here are few reference articles that might help you.