Merge pull request #1291 from tdouguo/ad-google-slot-env

提取谷歌广告 slot 编程环境变量
This commit is contained in:
tangly1024
2023-07-20 20:54:47 +08:00
committed by GitHub
2 changed files with 9 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ const AdSlot = ({ type = 'show' }) => {
data-ad-format="fluid"
data-adtest={BLOG.ADSENSE_GOOGLE_TEST ? 'on' : 'off'}
data-ad-client={BLOG.ADSENSE_GOOGLE_ID}
data-ad-slot="3806269138"></ins>
data-ad-slot={BLOG.ADSENSE_GOOGLE_IN_ARTICLE_SLOT}></ins>
}
// 信息流广告
@@ -69,7 +69,7 @@ const AdSlot = ({ type = 'show' }) => {
style={{ display: 'block' }}
data-adtest={BLOG.ADSENSE_GOOGLE_TEST ? 'on' : 'off'}
data-ad-client={BLOG.ADSENSE_GOOGLE_ID}
data-ad-slot="1510444138"></ins>
data-ad-slot={BLOG.ADSENSE_GOOGLE_FLOW_SLOT}></ins>
}
// 原生广告
@@ -79,7 +79,7 @@ const AdSlot = ({ type = 'show' }) => {
data-ad-format="autorelaxed"
data-adtest={BLOG.ADSENSE_GOOGLE_TEST ? 'on' : 'off'}
data-ad-client={BLOG.ADSENSE_GOOGLE_ID}
data-ad-slot="4980048999"></ins>
data-ad-slot={BLOG.ADSENSE_GOOGLE_NATIVE_SLOT}></ins>
}
// 展示广告
@@ -87,7 +87,7 @@ const AdSlot = ({ type = 'show' }) => {
style={{ display: 'block' }}
data-ad-client={BLOG.ADSENSE_GOOGLE_ID}
data-adtest={BLOG.ADSENSE_GOOGLE_TEST ? 'on' : 'off'}
data-ad-slot="8807314373"
data-ad-slot={BLOG.ADSENSE_GOOGLE_AUTO_SLOT}
data-ad-format="auto"
data-full-width-responsive="true"></ins>
}