Main Menu
Most Read
Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_mostread/helper.php on line 79 Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_mostread/helper.php on line 79 Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_mostread/helper.php on line 79 Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_mostread/helper.php on line 79 Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_mostread/helper.php on line 79
Support

If you like the products on these pages, your support is highly appreciated. Thank you very much!

Amount: 

Latest Items
Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_latestnews/helper.php on line 109 Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_latestnews/helper.php on line 109 Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_latestnews/helper.php on line 109 Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_latestnews/helper.php on line 109 Warning: Creating default object from empty value in /var/www/clients/client396/web1968/web/modules/mod_latestnews/helper.php on line 109
WordPress Google Ad Manager Plugin Installation and Usage
Written by Andreas Berger   
Saturday, 17 January 2009 18:37

A step for step tutorial on how to install and use the bretteleben.de Google Ad Manager Plugin for WordPress.

Installation

1.)

Unzip the archive and copy the folder 'wp-google-ad-manager-plugin' into the directory '/wp-content/plugins/'.

2.)

Activate the plugin in your WordPress backend.


 

Setup

The configuration of the plugin is situated at "Settings" > "Google Ad Manager"

1.)

The parameter "Pub Id" takes your Google Ad Manager Publisher Id.

You may find it e.g. in your Adsense Account at "My Account" > "Account Settings" near the bottom of the screen (AdSense for Content: ###########)

2.)

The fields S0 to S6 take 1 Ad-Slotname each.
These are called later - referenced by the field-name from your template, post or article.

3.)

The fields S7 to S9 take as many Ad-Slotnames you want, separated by a comma ",".

When the plugin calls one of these Arrays - referenced by there names 'S7', 'S8' or 'S9' - it will use each of the given Slots one time per page.
Use these fields when calling ads from within a post or from a position in your template, that is called more then one time per page. Set 3 slots and the first three posts will display the ads. Set 5, 7, 10 ... exactly.




Usage - Basics

The fields S0 bis S9 are called from Template, Post or Widget with: <!-- begam{field_name} -->.

1.) from 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:
<!-- begam{field_to_use} -->
where "field_to_use" is one of the fields above: S0 - S9, so - to call field S1, the call would look such as: <!-- begam{S1} -->

2.) from 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:
<!-- begam{field_to_use} -->
where "field_to_use" is one of the fields above: S0 - S9, so - to call field S7, the call would look such as: <!-- begam{S7} -->
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.) from a widget:

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:
<!-- begam{field_to_use} -->
where "field_to_use" is one of the fields above: S0 - S9, so - to call field S3, the call would look such as: <!-- begam{S3} -->


 

Usage - Parameters

The plugin supports additional attributes. 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:
<!-- begam{field_to_use/targeting_attributs/page_attributs,slot_attributs} -->

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 for field S3, using custom target-attributes may look such as:

<!-- begam{S3/Gender,male;AgeRange,18To24} -->

2.) Page-level and slot-level attributes - GA_googleAddAdSensePageAttr(param, value), GA_googleAddAdSenseSlotAttr(slotname, param, value)

The optional third 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) PageAttributes - GA_googleAddAdSensePageAttr(param, value)

A PageAttribute 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 for field S3 using custom target-attributes and PageAttributes may look such as:


<!-- begam{S3/Gender,male/google_color_bg,FF0000;google_color_link,00FF00} -->

 

2.2) SlotAttributes - GA_googleAddAdSenseSlotAttr(slotname, param, value)

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 for field S3, using custom target-attributes, page-level attributes and slot-level-attributes may look such as:

<!-- begam{S3/Gender,male/google_color_bg,FF0000;S,google_color_link,00FF00} -->

PageAttributes and SlotAttributes are declared in the same - third - section. The order is of no relevance, the plugin separates them by the number of there parts (2 for PageAttributes, 3 for SlotAttributes).

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 for field S3, using page-level and slot-level attributes but no custom target-attributes may look such as:

<!-- begam{S3//google_color_link,00FF00;S,google_color_bg,FF0000;S,google_color_link,0000FF} -->

Last Updated on Saturday, 26 September 2009 12:04
 
English
Panoramic Image Viewer
Follow me on Facebook
Follow me on Google+

bretteleben.de

Add to circles

Who's Online
We have 86 guests online