【问题标题】:Google Adsense ad not showing up in Jquery Mobile served by djangodjango 提供的 Jquery Mobile 中未显示 Google Adsense 广告
【发布时间】:2013-01-20 16:54:23
【问题描述】:

我正在尝试让 Google AdSense 广告显示在我的移动网站上。我正在使用 Django 来提供我的网页,并且正在使用 JQuery Mobile 来显示和格式化内容。我在静态 html 页面上关注了these blog instructions ,广告显示效果很好。当我在基本模板中使用完全相同代码时,移动广告不会展示。当我比较 HTML 源代码时,它们看起来完全相同,并且所有链接的工作方式完全相同。 Django 是否会在标题中注入一些东西来阻止广告显示? HTML源码如下:

    <html>
<head>
    <title>Test AdSense</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />    
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css"/>
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>    
    <script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>

    <script type="text/javascript"><!--
        google_ad_client = "ca-pub-XXXXXXXXXXXXXXXXXX";
        /* LTC MobileHeader */
        google_ad_slot = "XXXXXXXXXXXX";
        google_ad_width = 320;
        google_ad_height = 50;
    //-->
    </script>
</head>
<body>
    <div id="Div1" data-role="page" data-ajax="false">
        <header data-role="header" data-position="fixed">
            <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
            <h1>Index Page</h1>
        </header>
        <section data-role="content">
            <a href="page2.html" data-role="button" data-ajax="false">to Page 2</a>
        </section>
        <footer data-role="footer" data-position="fixed"></footer>      
    </div>  
</body>
</html>

【问题讨论】:

  • 看起来有点奇怪。为什么广告在 内,而 adsense .js 在 内?应该反过来。

标签: django jquery-mobile adsense


【解决方案1】:

我决定将代码上传到我在 Ubuntu 上运行的登台系统系统,并且广告可以正常显示。我的开发环境发生了一些事情,它在阻止对 Google 的调用的 Windows 上运行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-10-14
    • 2016-07-01
    • 1970-01-01
    • 2016-09-25
    • 1970-01-01
    • 2018-06-29
    • 2017-09-03
    • 2013-01-21
    相关资源
    最近更新 更多