跳转到主要内容
你行网

Main navigation

  • 首页
  • Drupal
  • 编程与开发
  • 数据库
  • 操作系统与应用
  • 服务器与运维
  • 社区
User account menu
  • 登录

面包屑

  1. 首页

Drupal 8 google adsense 安装教程

由 hrs, 18 七月, 2021

google adsense模块可以很容易的为你的drupal 站点插入谷歌联盟广告,安装这个模块之前,你必须关闭浏览器的广告屏蔽插件,因为该插件会导致adsense 模块的放置区块功能无法使用。

官网下载地址:https://www.drupal.org/project/adsense

安装 google adsense

我们可以使用composer 命令来安装它,打开终端输入以下命令,按回车执行安装就可以了,当然你也可以用手动的方式进行安装,可以到官网下载对应的最新版本,上传到服务器后再到扩展模块选择安装就可以了。这里我们使用composer 命令来安装它。

composer require 'drupal/adsense:^1.2'

启用google adsense

启用google adsense模块方式有很多,这里我们使用drush 命令来启用它,因为它很方便,你也可以在后台直接启用它。

drush en adsense

配置google adsense

我们只需要配置站点谷歌 AdSense 发布者ID就可以了。如图所示:

adsense3.png adsense3_0.png

添加展示区块

导航到结构,区块布局,点击放置区块,选择google adsense区块,点击放置后你就可以配置广告的id和显示的位置跟广告的大小。

adsense5.pngadsense5_0.png

  • 登录或注册以发表评论

文章标签

  • adsense

评论

文章标签

CSS
Excel
ubuntu
php
vim
五笔
Linux
VPN
command
HTML
drupal 8
drupal 7
centos
composer
Mysql
模块(module)
drush
Drupal
JavaSrcipt
apache
drupal 9
英语
nerdtree
SEO
network
果树种植
surround
drupal10
主题(theme)
ssh
phpmyadmin
yum
二进制
权限
声音
ssl
selinux
HTML5
WireGuard
password
Dreamweaver
DDEV
flameshot
翻译
颜色
uploadprogress
kernel
邮件验证
firewalld
视图(views)
快捷键
xdebug
gzip
错误
电脑基础
ckeditor
C语言
简介
源地址
mbstring
certbot
php扩展
git
httpd
csharp
电子秤
apt
压缩解压
breadcrumb
表单
短信验证
AI
firmware
摄影
diff
superfish
重定向
drupal 11
网站备份
版本号
docker
tagclouds
java
KVM
RSS
adsense
端口
电脑技巧
算法
simple_adsense
youtube
JavaScript
cookie
badblocks
计算机基础
网站运营
RFID
VUE
zip
dns
标签优化
gimp
form
mod_expires 模块
赚钱
ip
http验证
curl
重定向,301
netstat
字段
maven
input
nginx
哈希值
npm
wps
更多

相关文章

RSS源

友情链接 网站地图 版权信息 联系我们 网址导航 社区

Copyright © 2019 - 2021 你行网 版权所有  粤ICP备19072650号