端口Admob移动networking

我正在创build一个即将发布的移动网页游戏的深处。 我有兴趣通过这个应用程序货币化。 我希望游戏感觉像一个普通的应用程序,因此希望有admob广告(深度链接到应用程序商店)。 我听说,这些也有相当高的移动AdSense的CPM。 我的问题是:如果我使用node.js“port”admob将点击和​​视图logging为服务器端,即来自一个地方,或移动,即从用户?

以下是我正在考虑使用的一些资源:

https://media.admob.com/api/v1/docs/

https://github.com/floatinghotpot/cordova-plugin-admob

有什么想法吗?

我是你提到的插件的作者: https : //github.com/floatinghotpot/cordova-plugin-admob

基本版本已被弃用,推荐使用pro版本: https : //github.com/floatinghotpot/cordova-admob-pro

您可以考虑使用Cordova将您的html5游戏打包成混合APP,然后发布到Apple AppStore或Google Play Store,而不是将AdMob移植到移动网站。

使用AdMob插件在您的应用中展示广告,然后Google将付款给您。

只有几条javascript线来展示广告,而AdMob SDK将负责广告展示和用户点击。

看示例代码:

function onLoad() { if(( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) )) { document.addEventListener('deviceready', initApp, false); } else { initApp(); } } var admobid = {}; if( /(android)/i.test(navigator.userAgent) ) { admobid = { // for Android banner: 'ca-app-pub-6869992474017983/9375997553', interstitial: 'ca-app-pub-6869992474017983/1657046752' }; } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) { admobid = { // for iOS banner: 'ca-app-pub-6869992474017983/4806197152', interstitial: 'ca-app-pub-6869992474017983/7563979554' }; } else { admobid = { // for Windows Phone banner: 'ca-app-pub-6869992474017983/8878394753', interstitial: 'ca-app-pub-6869992474017983/1355127956' }; } // it will display smart banner at top center, using the default options if(AdMob) AdMob.createBanner( { adId: admobid.banner, position: AdMob.AD_POSITION.TOP_CENTER, autoShow: true } );