Include Ads in your Windows 8 Apps: JavaScript Based Windows 8 Apps
To include advertisement in your Windows 8 Apps (including the phone apps) see the article at:
https://msdn.microsoft.com/en-US/library/hh506371%28v=msads.10%29.aspx
For the walkthrough on using Advertisements in your HTML5/JavaScript Based apps (including Scirra Apps):
https://msdn.microsoft.com/en-US/library/hh506343(v=msads.10).aspx
Make sure to add error handling to your app where possible.