当前位置: 首页>>代码示例>>C#>>正文


C# TelemetryClient.TrackPageView方法代码示例

本文整理汇总了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);
 }
开发者ID:liqinghuang,项目名称:TaiwanUV,代码行数:10,代码来源:UVDetailView.xaml.cs

示例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);
        }
开发者ID:liqinghuang,项目名称:TaiwanUV,代码行数:11,代码来源:UVMapView.xaml.cs

示例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.
        }
开发者ID:akhilsathuluri,项目名称:WindowsApp,代码行数:17,代码来源:MainPage.xaml.cs

示例4: ReportPageView

 /// <summary>
 /// Track page view
 /// </summary>
 /// <param name="pageName"></param>
 public void ReportPageView(string pageName)
 {
     TelemetryClient client = new TelemetryClient();
     client.TrackPageView(pageName);
 }
开发者ID:Arthur-Lee,项目名称:Baconit,代码行数:9,代码来源:TelemetryManager.cs

示例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);
            }

        }
开发者ID:DavidMoore,项目名称:ipfilter,代码行数:36,代码来源:MainWindowViewModel.cs


注:本文中的Microsoft.ApplicationInsights.TelemetryClient.TrackPageView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。