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.

New Feature: Viewing Application Page Views in MarkedUp

Since MarkedUp opened up its public beta in late September, our number one most requested feature has been to enable developers to view all of the page navigation data we capture in the RegisterNavigationFrame method. We’ve captured this data all along, but haven’t had a report for viewing it!

Specifically, this method captures all page navigation events that occur inside an application – whenever a user transitions from one page to another, we automatically capture a PageEnter event and push the results back to MarkedUp.

Now you can see the results using our “application page views” report under the engagement tab on MarkedUp!

Application Page Views report, under the engagement tab in MarkedUp After you drill into the report, you’ll see a breakdown of your monthly traffic to each of the different pages in your app.

Here’s what the chart looks like for a standard WinRT app built using C# and XAML:

Application Page Views for WinRT application using MarkedUp And here’s the same chart for WinJS:

Application Page Views for WinJS application using MarkedUp If you click on any of the page names, you’ll have a chance to see a breakout chart with daily total page views and average views per-session:

Application Page views drill down We listened to your feedback and prioritized this report ahead of the others that we’re always working on. If you have any other product suggestions for MarkedUp, submit them here!