| 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. Installation1.)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.
SetupThe 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. 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. Usage - BasicsThe 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. 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. 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:
Usage - ParametersThe 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. Gender,male 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. 2.1) PageAttributes - GA_googleAddAdSensePageAttr(param, value)A PageAttribute always consists of two parts, the parameter and the value. To use more than one attribute, separate them with a semicolon ";" E.g.: 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. 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). 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: |
| Last Updated on Saturday, 26 September 2009 12:04 |


The plugin is only able to write the script tag that contains the fillslot-command. The URL you see is available only after the scripts in the head of the page enabled GoogleAdManager and the slot finally gets filled. I know, this doesn't help a lot, but if you have a look at the Google AdManager Help-Forum, the error you see happened before. Please get me right, I'm not trying to point away from me/my extension, but I am afraid, I will not be able to help in this case.
To verify, that the problem is not caused by the extension, you might try to change the creative displayed from Adsense/GAM-hosted to a third party creative or an image-/flash-redirect. I´m pretty sure the problem is bound to certain kinds of creatives.
If I´m wrong and the problem persists with different kind of creatives, please report back and I will go on trying to reproduce it (something I failed this time).
Best regards
Andreas
DukYAFqYjokQEAAAAQASDjp9sDOABY5dHr0gpg_YiMgegDsgEbd3d3LnJldGlyZWRwb3JucHJ
vZHVjZXIuY29tugEKMzAweDI1MF9hc8gBCdoBI2h0dHA6Ly93d3cucmV0aXJlZHBvcm5wcm9k
dWNlci5jb20vqQJo1D1NSReuPsACAuACAeoCG1JQUF9Ub3BSaWdodFNpZGViYXJfMzAweDI1MP
gC9NEekAPgA5gD4AOoAwE&num=0&client=ca-pub-xxxxxxxxxxxxxxxx&adurl=
This gets written to the page under the ad when the sidebar widget is used.