內容簡介
這個外掛可讓你設定 Google Ad Manager 發佈者 ID 和最多十個廣告欄位的名稱,並從模板、側邊欄小工具和文章中呼叫它們。
此外,它還完全支援自訂目標屬性、頁面層級屬性和欄位層級屬性。
如需更多資訊和更新,請造訪:
http://www.bretteleben.de
使用方式
在管理介面的「設定」>「Google Ad Manager」中設置發佈者 ID 和 Ad Slot 名稱後,即可呼叫以下內容:
1)在你的模板中:
在模板的原始碼中直接插入呼叫,以在模板中(在內容上方或下方、在側邊欄中的固定位置等)呼叫廣告。
呼叫以 HTML 註釋形式呈現,看起來像這樣:
其中,「field_to_use」是以上欄位之一:S0 - S9。例如,若要呼叫 S1 欄位,呼叫則如下所示:
2)在你的文章中:
切換到 HTML 檢視,將呼叫插入到文章中想要顯示廣告的位置。
呼叫以 HTML 註釋形式呈現,看起來像這樣:
其中,「field_to_use」是以上欄位之一:S0 - S9。例如,若要呼叫 S7 欄位,呼叫則如下所示:
您可能希望在文章中使用 7 到 9 個欄位,因為它們允許設置多個欄位。您可以在這些欄位中設置幾個欄位都可以,例如設置 3 個欄位,前三篇文章將會顯示廣告。 設置 5,7,10...就是這樣。🙂
3)在你的側邊欄中:
在你的側邊欄中加入一個文字小工具(對於「任意文字或 HTML」而言,它是隨附於 WordPress 的)並在其中放入呼叫,呼叫格式如下:
其中,「field_to_use」是以上欄位之一:S0 - S9。例如,若要呼叫 S3 欄位,呼叫則如下所示:
Ad Manager 屬性
此外,此外掛還支援其他屬性,這些屬性是可選的,現在可在呼叫中進行兩個額外的分段,由斜線「/」分開。
完整的呼叫最多可以由三個部分構成:
1)自訂目標屬性 - GA_googleAddAttr(key, value)
可選的第二部分中可能包含自訂的 Ad Manager 目標屬性,這些屬性會影響廣告選擇。
有關這些參數的更多資訊,請參閱 Google Ad Manager 說明文件。
自訂目標屬性始終由兩部分組成:屬性和值。
它們按照以下格式聲明:屬性「逗號」值。例如:Gender,Male
要使用多個屬性,請使用分號「;;」分開。例如:Gender,Male;AgeRange,18To24
使用自訂目標屬性的完整呼叫可能如下所示:
2)頁面層級屬性和欄位層級屬性- GA_googleAddAdSensePageAttr(param, value),GA_googleAddAdSenseSlotAttr(slotname,param,value)
可選的第二部分可能包含 Ad Manager 的頁面層級屬性和/或 Ad Manager 的欄位層級屬性。
有關這些參數的更多資訊,請參閱 Google Ad Manager 說明文件。
2.1)自訂頁面層級屬性始終由兩部分組成:參數和值。
它們按照以下格式聲明:參數「逗號」值。例如:google_color_bg,FF0000
若要使用多個屬性,請使用分號「;;」分隔。例如:google_color_bg,FF0000;google_color_link,00FF00
使用自訂目標屬性和頁面層級屬性的完整呼叫可能如下所示:
外掛標籤
開發者團隊
原文外掛簡介
The Plugin allows to set your Ad Manager Publisher ID + up to ten fields with Ad Manager Slotnames and to call them from within your template, from within sidebar widgets and from within posts.
Further it comes with full support for custom targeting attributes, page-level attributes and slot-level attributes.
For information and updates, please visit:
http://www.bretteleben.de
Usage
After having set PublisherID and AdSlotNames at “Settings” > “Google Ad Manager” in your Administration Interface put the calls:
1) in your Template:
To call ads from within your template (above or below content, at a fixed position in your sidebar, and so on …) insert the call directly into the sourcecode of the template.
The call comes as HTML-comment and looks such as:
where “field_to_use” is one of the fields above: S0 – S9, so – to call field S1, the call would look such as:
2) in your Posts:
To call ads from within a post, switch to HTML-view and insert the call at the position, you want the ad to be displayed within your post.
The call comes as HTML-comment and looks such as:
where “field_to_use” is one of the fields above: S0 – S9, so – to call field S7, the call would look such as:
You may want to use the fields 7 to 9 with your posts, because they allow to set more than one slot. How many slots you set in these fields is up to you. Set 3 slots and the first three posts will display the ads. Set 5, 7, 10 … exactly. 🙂
3) in your Sidebar:
To place ads in your sidebar, ad a Text-widget (for “Arbitrary text or HTML” – it comes with wordpress) to your sidebar and put into it the call, which again looks such as:
where “field_to_use” is one of the fields above: S0 – S9, so – to call field S3, the call would look such as:
Ad Manager Attributs
The plugin supports additional Attributs. These are – optional – added to the call in two additional sections, separated by forward slashes “/”.
The complete Call may consist of up to three sections:
1) Custom Targeting – GA_googleAddAttr(key, value)
The optional second section may contain custom Ad Manager target-attributes that influence ad selection.
For further information on these parameters please refer to the Google Ad Manager Help.
A custom target-attribute always consists of two parts, the attribute and the value.
They are declared following the scheme: Attribute “comma” Value. E.g.: Gender,Male
To use more than one attribute, separate them with a semicolon “;” E.g.: Gender,Male;AgeRange,18To24
The complete call using custom target-attributes may look such as:
2) Page Attributs and Slot Attributes – GA_googleAddAdSensePageAttr(param, value), GA_googleAddAdSenseSlotAttr(slotname, param, value)
The optional second section may contain Ad Manager page-level attributes and/or Ad Manager slot-level attributes.
For further information on these parameters please refer to the Google Ad Manager Help.
2.1) A custom page-level attribute always consists of two parts, the parameter and the value.
They are declared following the scheme: Parameter “comma” Value. E.g.: google_color_bg,FF0000
To use more than one attribute, separate them with a semicolon “;” E.g.: google_color_bg,FF0000;google_color_link,00FF00
The complete call using custom target-attributes and page-level attributes may look such as:
2.2) A custom slot-level attribute always consists of three parts, the slot, the parameter and the value.
They are declared following the scheme: Slot (represented by “S”) “comma” Parameter “comma” Value. E.g.: S,google_color_bg,FF0000
To use more than one attribute, separate them with a semicolon “;” E.g.: S,google_color_bg,FF0000;S,google_color_link,00FF00
(Notice: The “S” is replaced by the plugin with the corresponding Slotname automatically.)
The complete call using custom target-attributes, page-level attributes and slot-level-attributes may look such as:
3) IMPORTANT!
To use page-level or slot-level attributes without using target-attributes you have to declare an empty second section, otherwise the plugin will not be able to execute the call correctly.
In this case, the first section (field_to_use) is followed by 2 forward slashes!
The complete call using page-level and slot-level attributes but no custom target-attributes may look such as:
Version history
Version 1.1.0
Use register options for WP MU compatibility
Version 1.0.0
Support for custom targeting added
Support for page-attributes added
Support for slot-attributes added
Initial JavaScript-Tags updated
Changes in readme.txt
Version 1.0.0beta
Initial release version
