[WordPress] 外掛分享: Simple GAM

首頁外掛目錄 › Simple GAM
WordPress 外掛 Simple GAM 的封面圖片
10+
安裝啟用
★★★★
4/5 分(1 則評價)
2222 天前
最後更新
問題解決
WordPress 4.0+ v1.3.3 上架:2017-04-18

內容簡介

這是一個方便的外掛程式,可讓您輕鬆地將 Google Ad Manager(GAM)區塊加入 WP 中——包括短碼和模板功能。此外掛優化了多站點安裝,如果在單一站點安裝上有任何問題,請告訴我們。謝謝!

短碼

只需使用[simpledfp_block ad_id=xxxx],其中xxxx是在安裝外掛時創建的 DFP 廣告文章類型的 ID。

模板功能

請使用以下代碼:

if (class_exists('simplegam_main')) {
// 檢查是否安裝了外掛程式
simpledfpBlock(array('ad_id' => xxxx);
}

同時,xxxx也是您在 WordPress 管理面板中先前創建的 Simple GAM 廣告 ID。您可以像這樣檢索此ID。
我建議使用Reveal IDs plugin。

正確使用步驟

安裝外掛程式
在外掛程式的設置中填入 DFP 網絡識別符
管理面板的側欄會出現一個名為 DFP Ads 的新選單
使用它添加新的廣告,填寫必填字段:

DFP 程式碼區塊,就像在 DFP 後台中一樣
要在您的網站上顯示的區塊大小,格式為WWWxHHH(其中WWW是區塊的寬度,HHH是區塊的高度)

刷新前端,您應該會看到在您的網站上出現廣告區塊(如它們在 DFP 後台中所定義的)。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.3.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Simple GAM」→ 直接安裝(推薦)

原文外掛簡介

Finally an easy plugin to add Google Ad Manager (GAM) blocks into WP – shortcode and template function. It was designed to work with a multisite install, please tell me if any problem on a single site install. Thanks!
Shortcode
Simply use [simpledfp_block ad_id=xxxx] where xxxx is the id of your DFP ad post type, created when you installed the plugin.
Template function
Please use the following code:
if (class_exists('simplegam_main')) {
// checks the plugin is installed
simpledfpBlock(array('ad_id' => xxxx);
}

With, also xxxx being your Simple GAM Ad id, previously created in wordpress admin panel. You can retrive this ID like this.
I recommend the Reveal IDs plugin.
Steps to use correctly

Install the plugin
Fill the DFP network identifier in the settings of the plugin
A new menu DFP Ads appears in the sidebar of admin panel
Use it to Add a new ad, fill mandatory fields :

DFP Bloc code, as it appears in DFP backoffice
Size of bloc to display on you site, in the format WWWxHHH (where WWW is the width of the block, and HHH the height of the block)

Refresh you frontend, and you should see block creations (as they are defined in DFP backoffice) appear on your site.

延伸相關外掛

文章
Filter
Mastodon