Xbox One游戏货币化 - 广告 [英] Xbox One games monetization - advertisements
问题描述
你好,
你能帮我们一个建议吗?
- 我们计划将横幅广告和/或视频广告整合到HTML5 Xbox One游戏中。
- 我们有哪些选项?
- 是否有任何建议的SDK或推荐解决方案?
非常感谢您的帮助
亲切的问候,
Petr
Hello,
Can you help us with an advice please?
- We plan to integrate the banner and/or video advertisements into HTML5 Xbox One games.
- What options we have?
- Is there any suggested SDK or recommended solutions?
Thanks a lot for your help
Kind Regards,
Petr
推荐答案
>>是否有任何建议的SDK或推荐的解决方案?
我认为Microsoft Advertising SDK正是您所需要的。 我将简要介绍如何在
您的UWP应用中展示广告。您可以参考 <中的步骤span style ="font-size:10.5pt; font-family:'Segoe UI',sans-serif">使用Microsoft Advertising
SDK在您的应用中展示广告
更多细节。
I think Microsoft Advertising SDK is what you are looking for. I’ll make a short description about how to display ads in your UWP app. You could refer the steps in Display ads in your app with the Microsoft Advertising SDKfor more details.
请先通过NuGet或MSI安装此SDK。您可以参考此链接
安装Microsoft Advertising SDK 。
安装SDK后,添加对 Microsoft Advertising SDK for JavaScript 在参考管理器中。
Please install this SDK via NuGet or MSI first. You could refer this link Install the Microsoft Advertising SDK. After installed the SDK, add a reference to Microsoft Advertising SDK for JavaScript in the Reference Manager.
然后您需要在您的应用中实施广告。如果我们需要在JS应用中展示横幅广告,请在< head >中添加引用。首先是HTML文件的
部分,然后在< 正文>中为AdControl添加 div 部分。请参考以下代码:
Then you need to implement ads in your app. If we need to display banner ads in a JS app, add references in the <head> section of the HTML file first and add the div for the AdControl in the <body> section. Please refer the following code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>AdControlExampleApp</title>
<!-- WinJS references -->
<link href="lib/winjs-4.0.1/css/ui-light.css" rel="stylesheet" />
<script src="lib/winjs-4.0.1/js/base.js"></script>
<script src="lib/winjs-4.0.1/js/ui.js"></script>
<!-- AdControlExampleApp references -->
<link href="css/default.css" rel="stylesheet" />
<script src="js/main.js"></script>
<!-- Required reference for AdControl -->
<script src="//Microsoft.Advertising.JavaScript/ad.js"></script>
</head>
<body>
<div id="myAd" style=" width: 300px; height: 250px;
data-win-control="MicrosoftNSJS.Advertising.AdControl"
data-win-options="{applicationId: '3f83fe91-d6be-434d-a0ae-7351c5a997f1', adUnitId: 'test'}">
</div>
<p>Content goes here</p>
</body>
</html>
您还可以在Javascript中以编程方式创建AdControl。有关在您的应用中实施广告的详细信息,请参阅
此链接: https://docs.microsoft.com/en -us / windows / uwp / monetize / developer-walkthroughs
还有一个关于
的官方样本 广告 。
There is also an official sample about Advertising.
在您的应用中实施广告后,您需要创建广告单元并配置中介,然后再将其提交到
商店。请参考 在您的应用中设置广告单元
,了解有关在开发人员中心创建广告单元的详细信息。
最好的问候,
Roy
这篇关于Xbox One游戏货币化 - 广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!