WordPress安装Google AMP插件加入谷歌Adsense广告和Analytics代码

    使用Google AMP移动网页加入谷歌Adsense广告及谷歌分析Analytics文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    Google推出的Accelerated Mobile Pages(简称:AMP)是一项加速移动网站的网页技术,官方声称可以在智能手机或平板计算机的数码装置,开启AMP网页比传统的Mobile移动网页快4倍速度,大大降低页面加载的时间,提供给访客一个快速的浏览体验。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    其实说白了『Google AMP HTML Pages』 与『Facebook Instant Articles』技术上是非常相似的,只是一个在Google网站,另一个是Facebook所使用的移动网页技术,但是AMP除了可以加速文章页面外,还可以加入Google 谷歌Adsense广告及谷歌分析Analytics分析统计代码,使博客也可以收取广告费用和查看网站的AMP页面带来的人流及浏览量。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    WordPress 如要使用AMP及想在AMP页面加入谷歌Adsense广告与谷歌分析Analytics统计代码,需要安装两个插件,方可以完美整合程序,你可以按照以下的方法做。文章源自技术奇点-https://www.xerer.com/archives/30673.html

    WordPress安装Google AMP插件加入谷歌Adsense广告和Analytics代码文章源自技术奇点-https://www.xerer.com/archives/30673.html

    OK!…Action ^.^文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    使用 AMP文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 在控制台(后台)安装AMP外挂(插件),使用搜寻功能找「AMP」外挂,然后安装并启用。

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 前往Google 网站管理工具(Google Search Console)请按此处去,来到AMP「加速移动版网页」管理移动网页,这里可以修正 Accelerated Mobile Pages (AMP) 中的适当问题,才能明确为移动装置用户提供 AMP 网页。

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    注意: 当安装AMP外挂后,可能需要等待「1-3」天的时间,才能够在Google 网站管理工具看到相关数据。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    AMP 建立谷歌Adsense广告文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 在控制台(后台)安装「Facebook Instant Articles & Google AMP Pages by PageFrog」外挂(插件),加入广告及统计代码。

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 安装并开启外挂成功,在左侧栏的「Mobile Formats」–>「setup」位置检查Google AMP HTML是否已经「Ready」准备好了。

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 新增谷歌Adsense广告代码,在侧栏「Ads」的页面,拉到下方的「Google AMP HTML」位置,单击「Sign in with Google」登入Google的谷歌Adsense账号,并弹出「Choose 谷歌Adsense Ad Unit」页面加入不同尺寸的广告。

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 当创建广告代码成功后,请记得必须勾选「Enable Google 谷歌Adsense for AMP HTML Pages」广告显示在AMP页面,以及「Ad Placement」可以调整广告显示在文章的第N个字节,然后按「Save All Settings」储存变更。

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    特别说明:Show an ad every — words字段,建议输入「0-10」数字,因为经本人测试,外挂是以英文字母作计算,如果中文就不是那么友好了,所以字节愈少显示广告的数量,也可以控制在「3」个以内。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    AMP 放上谷歌分析Analytics统计文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 单击左边栏的「Mobile Formats」–>「谷歌分析Analytics」统计页,选择「GOOGLE 谷歌分析ANALYTICS」弹出页面,并点击「Sign in with Google」按钮,登入Google的谷歌分析Analytics账号。 请看图片▼

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 登入Google 谷歌分析Analytics账号成功,在页面筛选统计的网站,然后按「Choose Site」按钮,并点击上方绿色的「Enable Integrabion」按钮,整合分析统计。 请看图片▼

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    检查AMP页面文章源自技术奇点-https://www.xerer.com/archives/30673.html

    经过以上的步骤后,已经开启AMP页面和加入广告及谷歌分析Analytics统计代码了,接下来我们检查一下是否成功。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    如何打开AMP页面,只要在网址(连结)后加上「/amp」尾巴即可。文章源自技术奇点-https://www.xerer.com/archives/30673.html

    例如: https://www.moonlol.com/google-amp-谷歌Adsense-谷歌分析Analytics-6003.html/amp文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    成功打开AMP页面,文章的Ads广告已经出现了,并利用浏览器的「检视网页原始码」功能,查看网站源码,可以看到谷歌分析Analytics统计代码也有了。 请看图片▼文章源自技术奇点-https://www.xerer.com/archives/30673.html

    <amp-谷歌分析Analytics type="google谷歌分析Analytics">文章源自技术奇点-https://www.xerer.com/archives/30673.html

    <script type="application/json">文章源自技术奇点-https://www.xerer.com/archives/30673.html

    ....文章源自技术奇点-https://www.xerer.com/archives/30673.html

    </script>文章源自技术奇点-https://www.xerer.com/archives/30673.html

    </amp-谷歌分析Analytics>文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    特别介绍文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 外挂有一个相当体贴的功能,在「Styling」的PageFrog页面,可以在控制面板设置AMP主题,例如:加入Logo、调整文字及背景色等,以及可以实时预览AMP的变化,只要复制下方的「Mobile Preview Link 」短连结,在浏览器打开,能够实时看到AMP预览页。

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    1. 这个外挂还有一个功能,可以管理「Facebook Instant Articles」脸书的实时文章,不过,笔者对FB这个移动技术没有多大的兴趣,你可以自行研究一下。

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    功能更强大的AMP管理外挂(插件)文章源自技术奇点-https://www.xerer.com/archives/30673.html

    AMP「AMP for WP – Accelerated Mobile Pages」外挂,如果想在AMP页面,加入分享按钮、自定义广告、谷歌Adsense广告或相关文章等,或者在控制面板查看实时流量报表,可以安装此插件。文章源自技术奇点-https://www.xerer.com/archives/30673.html

    附注:这个外挂的功能上虽然很强大,但是,比较占用数据库资源,增加服务器负载。你可以按此处了解。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    Q&A文章源自技术奇点-https://www.xerer.com/archives/30673.html

    可以自行安装广告代码!?文章源自技术奇点-https://www.xerer.com/archives/30673.html

    答:可以的,请按此处手动建立AMP广告,及查看相关说明。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    可以自行安装统计代码!?文章源自技术奇点-https://www.xerer.com/archives/30673.html

    答:可以的,请按此处手动创建AMP页面,独有的谷歌分析Analytics分析代码。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    艾薇有话儿:文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    广告及统计代码,暂时不建议手动自行加上,因为AMP外挂(插件)日后升级新版本,原文件会被覆盖,那以前修改的就白费了,所以笔者选择安装外挂来解决。文章源自技术奇点-https://www.xerer.com/archives/30673.html

     文章源自技术奇点-https://www.xerer.com/archives/30673.html

    Google已经针对导入AMP技术的网页,提高其被检索优先排序,同时也曾预告未来将会朝向针对移动装置优化内容提供优先排序的作法,那些有选择困难症或是无法接受牠的页面样式及简易风格的网主,你还在犹疑嘛﹗文章源自技术奇点-https://www.xerer.com/archives/30673.html

    weinxin
    微信公众号
    扫码关注公众号获取资源下载及吃瓜爆料
    • 本文由 发表于 2019/07/1122:35:23

    发表评论

    匿名网友