本文整理汇总了C#中Microsoft.ApplicationInsights.TelemetryClient.TrackPageView方法的典型用法代码示例。如果您正苦于以下问题:C# TelemetryClient.TrackPageView方法的具体用法?C# TelemetryClient.TrackPageView怎么用?C# TelemetryClient.TrackPageView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.ApplicationInsights.TelemetryClient
的用法示例。
在下文中一共展示了TelemetryClient.TrackPageView方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnNavigatedFrom
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
//當使用者離開頁面時, 將資料記錄下來做分析
var telemetry = new TelemetryClient();
PageViewTelemetry pvT = new PageViewTelemetry("ViewedUVDetailView");
TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true;
telemetry.Context.Device.Id = BasicInfo.DeviceID;
telemetry.Context.User.Id = BasicInfo.UserName;
telemetry.TrackPageView(pvT);
}
示例2: OnNavigatedFrom
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
TelemetryClient telemetry = new TelemetryClient();
TelemetryConfiguration.Active.TelemetryChannel.DeveloperMode = true;
PageViewTelemetry pvT = new PageViewTelemetry("ViewedMapView");
telemetry.Context.Device.Id = BasicInfo.DeviceID;
telemetry.Context.User.Id = BasicInfo.UserName;
pvT.Duration = DateTime.Now.Subtract(startViewTime);
telemetry.TrackPageView(pvT);
}
示例3: OnNavigatedTo
/// <summary>
/// Invoked when this page is about to be displayed in a Frame.
/// </summary>
/// <param name="e">Event data that describes how this page was reached.
/// This parameter is typically used to configure the page.</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
TelemetryClient telemetryclient = new TelemetryClient();
telemetryclient.TrackPageView("MainPage");
// TODO: Prepare page for display here.
// TODO: If your application contains multiple pages, ensure that you are
// handling the hardware Back button by registering for the
// Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
// If you are using the NavigationHelper provided by some templates,
// this event is handled for you.
}
示例4: ReportPageView
/// <summary>
/// Track page view
/// </summary>
/// <param name="pageName"></param>
public void ReportPageView(string pageName)
{
TelemetryClient client = new TelemetryClient();
client.TrackPageView(pageName);
}
示例5: Initialize
public async Task Initialize()
{
try
{
telemetryClient = new TelemetryClient();
telemetryClient.InstrumentationKey = "23694f6c-53c2-42e2-9427-b7e02cda9c6f";
telemetryClient.Context.Component.Version = Process.GetCurrentProcess().MainModule.FileVersionInfo.FileVersion;
telemetryClient.Context.Session.Id = Guid.NewGuid().ToString();
telemetryClient.Context.Device.OperatingSystem = Environment.OSVersion.ToString();
telemetryClient.TrackPageView("Home");
telemetryClient.Flush();
}
catch (Exception ex)
{
Trace.TraceError("Couldn't initialize telemetry: " + ex);
}
// Check for updates
await CheckForUpdates();
SelectedMirrorProvider = MirrorProviders.First();
apps = (await applicationEnumerator.GetInstalledApplications()).ToList();
if (!apps.Any())
{
Trace.TraceWarning("No BitTorrent applications found.");
return;
}
foreach (var result in apps)
{
Trace.TraceInformation("Found app {0} version {1} at {2}", result.Description, result.Version, result.InstallLocation);
}
}