Skip to content

Instantly share code, notes, and snippets.

@Aaronontheweb
Created November 6, 2012 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aaronontheweb/4021549 to your computer and use it in GitHub Desktop.
Save Aaronontheweb/4021549 to your computer and use it in GitHub Desktop.
Tracking navigation events in WinJS apps using MarkedUp Analytics (https://markedup.com/)
(function () {
"use strict";
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
var nav = WinJS.Navigation;
WinJS.strictProcessing();
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.launch) {
MK.initialize("{YOUR API KEY from MarkedUp.com here!}");
//listen for page events
MK.registerNavigationFrame();
}
};
/* rest of the WinJS app event handlers and methods */
app.start();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment