How-to: Tracking Page Navigation in Your WinRT or WinJS Applications

Today MarkedUp released a new report type which shows how often users view all of the distinct pages inside your Windows Store applications on Windows 8; so how do you how to actually capture all of this page navigation information in your app using MarkedUp?

Easy! You can use a single method to automatically track all of the page navigation information inside of your C# / C++ / HTML5 Windows Store apps: RegisterNavigationFrame.

The RegisterNavigationFrame method allows MarkedUp to automatically detect how users navigate between pages inside your application and eliminates the need for developers to have to write their own handler code and call the PageEnter event manually.

Calling RegisterNavigationFrame in C# / XAML

If you’re using C# and XAML to develop your Windows Store applications, you’ll want to call MarkedUp.AnalyticClient.RegisterNavigationFrame inside the Application.OnLaunched method, as shown below:

Calling registerNavigationFrame in HTML5 / JavaScript

If you’re using HTML5 and JavaScript to develop your Windows Store applications, you’ll want to call MK.registerNavigationFrame inside the WinJS app.onactivated method, as shown below:

Pretty simple! If you add this single line of code to your Windows Store applications you’ll see data light up on your application page views report and on others that we’re actively developing right now!

Let us know in the comments if you have any questions.


Comments are closed.