【问题标题】:Adsense Stopped Showing Ads after Angularjs used使用 Angularjs 后 Adsense 停止显示广告
【发布时间】:2019-03-21 21:07:10
【问题描述】:

我有一个启用了 Google adsense 的 Asp.net mvc 站点,并在 Layout.cs 中添加了脚本,并且内容通过 ajax 和 jquery 从 api 生成。一切正常,广告在哪里展示

最近我添加了一个新页面,我在其中使用 angularjs 使用 CDN 进行数据绑定。页面运行良好。但广告停止显示。仅在该页面上。控制台上显示的消息是

资源http://pagead2.googlesyndication.com/pagead/js/r20190313/r20190131/show_ads_impl.js 已使用链接预加载进行预加载,但在窗口加载事件后的几秒钟内未使用。请确保它具有适当的as 值并且是有意预加载的。

在 Layout.cs 中

 <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
        (adsbygoogle = window.adsbygoogle || []).push({
            google_ad_client: "ca-pub-1771190807684402",
            enable_page_level_ads: true
        });
    </script>

Adding URL of my Site for reference 

JumptoJob-Online exam

我的 angularjs 页面控制器看起来很简单

   <script>
    "use strict";

    /*We need to manually start angular as we need to
    wait for the google charting libs to be ready*/

    var mainApp = angular.module("mainApp", ['googlechart']);
    mainApp.controller('QuestionController', myControllerFunction);
    myControllerFunction.$inject = ["$scope", "$http", "$timeout"];


    function myControllerFunction($scope, $http, $timeout) {
}
      </script>

【问题讨论】:

    标签: angularjs asp.net-mvc adsense


    【解决方案1】:

    我联系了 AdSense 支持并提供了 URL。他们让我等待几个小时,然后广告开始展示。按照他们的说法,使用带有 angularjs 的 adsense 指令总是比使用普通的 adsense 脚本和自动广告更好

    【讨论】:

      猜你喜欢
      • 2014-10-14
      • 2016-07-01
      • 2013-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-13
      • 2021-12-26
      相关资源
      最近更新 更多