Created
November 6, 2012 00:27
-
-
Save Aaronontheweb/4021549 to your computer and use it in GitHub Desktop.
Tracking navigation events in WinJS apps using MarkedUp Analytics (https://markedup.com/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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