Until recently I used the plugin “Advertising Manager”. However, I am not quite satisfied the set of its capabilities. For example, the inability to display scheduled advertisements, or the inability to display ads in the posts only certain categories. Etc.
That’s why I wrote my own plugin to control the advertising on the blog – Simple Ads Manager. I tried to create a plugin that will satisfy most requests of any blogger to manage advertising on the blog. And I think I managed it.
Simple Ads Manager is easy to use plugin providing a flexible logic of displaying advertisements.
Features
- Flexible logic of advertisements rotation based on defined weight of each advertisement in group (Ads Place)
- Custom default ad for each Ads Place Allowed types of ad’s codes are HTML, javascript, PHP
- Codes of Google DoubleClick for Publishers (DFP) supports
- More flexibility of displaying ads by using Ads Zone selector
- Outputting ads as widget
- Outputting ads as shortcodes in any place of single post/page content
- Outputting ads in any place of theme template using output functions
- Customizable outputting ads as block of ads
- Automatic outputting ads in single post/page if allowed
- Customizable limitation of displaying advertisements by types of page
- Customizable limitation of displaying advertisements on single post page by post ID (IDs)
- Customizable limitation of displaying advertisements on single post page or category archive page by category (categories)
- Customizable limitation of displaying advertisements on single post page or author archive page by author (authors)
- Customizable limitation of displaying advertisements on single post page or tag archive page by tag (tags)
- Customizable limitation of displaying advertisements on custom type single post page or custom type archive page by Custom Type (Types)
- Customizable blocking of displaying advertisements on single post/page by post/page ID (IDs)
- Customizable blocking of displaying advertisements on single post page or category archive page by category (categories)
- Customizable blocking of displaying advertisements on single post page or author archive page by author (authors)
- Customizable blocking of displaying advertisements on single post page or tag archive page by tag (tags)
- Customizable blocking of displaying advertisements on custom type single post page or custom type archive page by Custom Type (Types)
- Schedule of displaying each advertisement if allowed
- Customizable limitation of displaying advertisements by hits
- Customizable limitation of displaying advertisements by clicks
- Statistics of hits
- Statistics of clicks (your own advertisement image mode)
- Customizable accuracy of bots and crawlers detection
- Counting revenue from ads placement, display ads and clicks on advertisements
Available languages
- English
- Russian
- German by Fabian Krenzler and Ulrich Simon
- Belarusian by Alexander Ovsov (Web Geek Sciense)
- Spanish by xiaobai_wp
- Italian by Alfredo
The Concept
The main object of the plugin is “Ads Place“. Each Ads Place is a container for the advertisements and provides the logic of the show and rotation. In addition, one of the parameters of advertising space is “patch ad code”, ie ad to be shown if and only if the logic of ads this Ads Place does not permit to show none of the advertisements contained in this Ads Place. One Ads Place can contain any number of objects “advertisement”.
Object “advertisement” rigidly attached to his container “Ads Place”. Its parameters determine frequency (weight) of displaying and limiting displaying from “show all pages” to “show the articles with ID … ” and show from date to date (the schedule).
Additional object “Ads Zone” is selector developed for increasing the flexibility of displaying ads. This optional object can be useful for conducting advertising campaigns using a large number of promotional materials.
The additional object “Ads Block” allows to display the block of advertisements.
Installation
- Upload the plugin folder to the folder
/wp-content/plugins/
- Activate the plugin on the Plugins page
- Configure your plugin to meet your needs
- Create an Ads Spaces in the right quantity and fill them with advertisements
Options
Go to the page Ads->Settings
Views per Cycle – the number of impressions an ad for one cycle of rotation, provided that this ad has maximum weight (the activity). In other words, if the number of hits in the series is 1000, an ad with a weight of 10 will be shown in 1000, and the ad with a weight of 3 will be shown 300 times.
Do not set this parameter to a value less than the maximum number of visitors which may simultaneously be on your site – it may violate the logic of rotation.
Not worth it, though it has no special meaning, set this parameter to a value greater than the number of hits your web pages during a month. Optimal, perhaps, is the value to the daily shows website pages.
Display Ad Source in – you can display advertisement target in new or current window (tab). Select target window (tab).
Auto Inserting Settings – here you can select the Ads Places and allow the display of their ads before and after the content of single post.
Google DFP Settings – if you want to use codes of Google DFP rotator, you must allow it’s using and define your pub-code.
Statistics Settings
Bots and Crawlers detection
For obtaining of more exact indexes of statistics and incomes it is preferable to exclude data about visits of bots and crawlers from the data about all visits of your blog. If enabled and bot or crawler is detected, hits of ads won’t be counted. Select accuracy of detection but use with caution – more exact detection requires more server resources.
Allow Bots and Crawlers detection – If allowed, hits of detected bot won’t be counted.
Accuracy of Bots and Crawlers Detection:
- Inexact detection – This method is based on an analysis of the request header. Inaccurate method.
- Exact detection – This method uses the Browser library by Chris Schuld for detection of bots. Recommended.
- More exact detection – This method uses “browscap” data for bots detection. Very exact and very slow method. If browscap not defined in your php.ini, this method is unavailable.
Display of Currency:
- Auto – auto detection of currency from blog settings.
- USD – Forcing the display of currency to U.S. dollars.
- EUR – Forcing the display of currency to Euro.
Ads Place creation and configuration
Go to your list of Ads Places (Ads -> Ads Places) and click the “Add New Place”. In the opened editor window configure current Ad Place.
Enter a name and a description of the Ads Place. In principle, it is not mandatory parameters, because these parameters don’t influence anything, but experience suggests that after a while all IDs usually will be forgotten and such information may be useful.
Ads Place Size – in this version is only for informational purposes only, but in future I plan to use this option. It is desirable to expose the real size.
Ads Place Patch – it’s an ad that will appear in the event that the logic of basic ads outputing of this Ads Place on the current page will not be able to choose a single basic ad for displaying. For example, if all basic announcements are set to displaying only on archives pages or single pages, in this case the patch ad of Ads Place will be shown on the Home page. Conveniently to use the patch ad of Ads Place where you sell the advertising place for a limited time – after the time expiration of ordered ad will appear patch ad. It may be a banner leading to your page of advertisement publication costs or a banner from AdSense.
Patch can be defined:
- as combination of the image URL and target page URL
- as HTML code or javascript code
- as name of Google DoubleClick for Publishers (DFP) block
If you select the first option (image mode), tools to download/choosing of downloaded image banner become available for you.
Codes – as Ads Place can be inserted into the page code not only as widget, but as a short code or by using function, you can use code “before” and “after” for centering or alignment of Ads Place on the place of inserting or for something else you need. Use HTML tags.
Advertisement creation and configuration
Go to the list of Ads Places (Ads -> Ads Places), move the mouse to the desired Ads Place, select in the row menu that appears “View Ads” for the transition to the advertisements list of this Ads Place or “Add Ad” for the transition to the editor of a new ad. If you went to the list of ads, click on “Add New Ad”.
Enter a name and a description of the advertisement. These parameters are optional, because don’t influence anything, but help in the visual identification of the ad (do not forget which is which).
Ad Code – code can be defined as a combination of the image URL and target page URL, or as HTML code, javascript code, or PHP code (for PHP-code don’t forget to set the checkbox labeled “This code of ad contains PHP script). If you select the first option (image mode) you can keep statistics of clicks and also tools for uploading/selecting the downloaded image banner becomes available to you.
Restrictions of Advertisement Showing
Ad Weight – coefficient of frequency of show of the advertisement for one cycle of advertisements rotation.
0 – ad is inactive, 1 – minimal activity of this advertisement, 10 – maximal activity of this ad.
Restrictions by the type of pages – select restrictions:
- Show ad on all pages of blog
- Show ad only on pages of this type – ad will appear only on the pages of selected types
- Show ad only in certain posts – ad will be shown only on single posts pages with the given IDs (ID items separated by commas, no spaces)
Additional restrictions
- Show ad only in single posts or categories archives of certain categories – ad will be shown only on single posts pages or category archive pages of the specified categories
- Show ad only in single posts or authors archives of certain authors – ad will be shown only on single posts pages or author archive pages of the specified authors
Use the schedule for this ad – if necessary, select checkbox labeled “Use the schedule for this ad” and set start and finish dates of ad campaign.
Use limitation by hits – Use this parameter for limiting displaying of ad by hits.
Use limitation by clicks – Use this parameter for limiting displaying of ad by clicks.
Prices – your prices for that ad.
- Ad placement per month – used only for scheduled ads.
- Per Thousand Hits – Not only humans visit your blog, bots and crawlers too. In order not to deceive an advertiser, you must enable the detection of bots and crawlers.
- Per Click – To calculate the earnings on clicks, you must enable counting of clicks for that ad.
Ads Zone creation and configuration
Ads Zone is selector that used to select the appropriate Ads Place for each type of displayed page.
Go to your list of Ads Zones (Ads -> Ads Zones) and click the “Add New Zone”. In the opened editor window configure current Ads Zone.
Enter a name and a description of the Ads Zone.
Select default Ads Place.
Select the appropriate Ads Places for each type of page, category or author or leave “Default” value. You can block displaying Ads Place on needed type of page selecting “None” value.
Ads Block creation and configuration
Ads Block used for outputting block of ads.
Go to your list of Ads Blocks (Ads -> Ads Blocks) and click the “Add New Block”. In the opened editor window configure current Ads Block.
Enter a name and a description of the Ads Block.
Enter number of lines and columns of Ads Block. After changing these properties you must save Ads Block settings before using Ads Block Editor.
Configure styles for Ads Block and Block’s items. Use Stylesheet rules for defining these properties. For example: url(sheep.png) center bottom no-repeat
for background property or 5px solid red
for border property.
Important Note: As the Ads Block is the regular structure, predefined styles of individual items for drawing Ads Block’s elements aren’t used. Define styles for Ads Block Items on Ads Block Editor page!
Customize Ads Block structure (select Ads Place or Ads Zone or Single Ad for each item of block).
Usage
There are three variants for output: widgets, short codes, the function… and auto inserting…
Widgets
Go to the widgets page (Appearance->Widgets). In the area of available widgets locate widget “Ads Place” and drag it to the necessary sidebar. You can also use widgets “Ads Zone” and “Single Ad”.
Configure your widget:
- Title – title of widget. If not needed, leave empty.
- Ads Place – select Ads Place from a list of all Ads Places.
- Hide widget style – in some theme templates it is necessary for the sidebar in the blog header.
- Allow using previously defined “before” and “after” codes of Ads Place – these are the codes that are defined for each Ads Place as “code before” and “code after”.
Widgets “Ads Zone” and “Single Ad” can be configured in the same way.
Shortcodes
Shortcode “sam” enables you to insert Ads Place anywhere in the post’s content.
- id – ID of Ads Place
- codes – allow or not allow to use Ads Place codes “before” and “after”. Default “false”
Shortcode “sam_zone” enables you to insert Ads Zone anywhere in the post’s content.
- id – ID of Ads Zone
- codes – allow or not allow to use Ads Place codes “before” and “after”. Default “false”
Shortcode “sam_ad” enables you to insert Single Ad anywhere in the post’s content.
- id – ID of Ad
- codes – allow or not allow to use Ads Place codes “before” and “after”. Default “false”
Shortcode “sam_block” enables you to insert Ads Block anywhere in the post’s content.
- id – ID of Ads Zone
Output functions
In order that would insert Ads in any place of theme template, use the drawAdsPlace, drawAdsZone or drawAd functions.
Output functions are defined as follows:
1 2 3 4 |
function drawAdsPlace($args = null, $codes = false) function drawAdsZone($args = null, $codes = false) function drawAd($args = null, $codes = false) function drawAdsBlock($args = null) |
- args – array, which may include id (ID of Ads Place) or/and name (the name of Ads Place, not recommended)
- codes – bool|array, allow or not allow to use Ads Place codes “before” and “after”. Default “false”. If bool value, codes ‘before’ and ‘after’ will be received from Ads Place record. If array value, codes ‘before’ and ‘after’ will be received from array.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// Ads Place output if(function_exists('drawAdsPlace')) drawAdsPlace(array('id' => 1), true); // or if(function_exists('drawAdsPlace')) drawAdsPlace(array('id' => 1), array('before' => '<div class="ad">', 'after' => '</div>')); // Ads Zone output if(function_exists('drawAdsZone')) drawAdsZone(array('id' => 1), true); // or if(function_exists('drawAdsZone')) drawAdsZone(array('id' => 1), array('before' => '<div class="ad">', 'after' => '</div>')); // Single Ad output if(function_exists('drawAd')) drawAd(array('id' => 1), true); // or if(function_exists('drawAd')) drawAd(array('id' => 1), array('before' => '<div class="ad">', 'after' => '</div>')); // Ads Block output if(function_exists('drawAdsBlock')) drawAdsBlock(array('id' => 1)); |
Auto Inserting
Designed for automatic insertion of ad codes before and after the content of single post. Configuring is on plugin settings page.
Miscellaneous
At first glance, it might seem that the plugin is too heavy – as did 500 kb codes. But do not be terrified ahead of time, the plugin is using the technology of saving resources. In other words, in the Face Side is loading only 23 kb of codes, of which 21 kb PHP-code and 2 kb javascript code. Everything else are extentions for the admin mode, and even then, not all are loading en masse, but only if necessary.
Video Lessons:
Donations
Donations List
Many thanks to everyone who supports the development of this plugin:
Michael Kiepert, Andrea Vacondio
Download
© 2011 – 2018, minimus. All rights reserved.
Hi! Your plugin is awesome! It’s the exactly i needed but one more thing… Is there any way to include/exclude not only _all_ archieves of custom taxonomy but exactly the entered category ID in this taxonomy?
I’m running wp e-commerce plugin that uses wpsc_product_category taxonomy for products categories. And now all i can do is showing ads on each category… But I need to show different ads on different categories. Is it possible?
Total Comment by Olga: 1
I am using this great plugin on my blog
the only prob I am facing is unable to disabled ads on non-posts pages. i.e about / donate etc
to achieve this I have selected single post in
Show ad only on pages of this type:
still ad appears.
you can view it on
//www.linuxreaders.com.
Total Comments by linuxreaders: 4
Do you set radio button?
hi,
yes, I have selected
SHOW AD ONLY ON PAGES OF THIS TYPE
then
SINGLE POST
Total Comments by linuxreaders: 4
I repeat these properties on my test blog and all works (ad on single posts, include custom type posts and default ad on non-post pages)…
hi,
its got resolved once i removed same code from AD PLACE & kept only AD LIST.
I had kept as it states below.
The patch (default advertisement) will be shown that if the logic of the plugin can not show any contained advertisement on the current page of the document.
Thanks for the help, its working fine now.
Total Comments by linuxreaders: 4
Can you, please explain waht is AD LIST?
Is it AD BLOCK or what?
I
m asking, because I
m trying ro show ad in posts of only category, but still can not achieve it!Total Comments by robertkein: 10
Finally it works!
In restrictions of ad I ahd to put names, but not id of categories
Total Comments by robertkein: 10
One more question.
Is there any way to block these ads appear on wptouch ?
Total Comments by linuxreaders: 4
How can I place ads on the top of the pages?
Total Comments by JUAN GARCIA: 2
Use widget (if possible) or functions of plugin…
Hi,
I am testing your plugin, and it looks nice. I have one question though: If I would like to show like 12 ads on the same page, I use Ad Block, but: I would like the ads to show randomly and not at the same place everytime. Is this possible?
Total Comment by Jaeger: 1
As I understood, it`s possible, but only if you put same banner to all the places or if you use ad block, for example 2×2 and in every ad place you should put same ad place id.
Total Comments by robertkein: 10
By the way, Minimus, your blog is redirecting mobile traffic to troyan software download page.
Total Comments by robertkein: 10
Thank you! Fixed, I think…
Hi! I’m trying to insert an AdsPlace on the header of my website //senderosporvenezuela.com.ve , but I get syntax error 🙁
Total Comments by JUAN GARCIA: 2
Did you use this code?:
Or you use Ads Place widget?
When activating counting of clicks I get the following error
samAjax is not defined
Any suggestions?
Total Comments by Lars: 2
URL of blog?
Blog URL is //klint.co/clients/mjoc/
Click on the banner ad and inspect your console output in the browser.
Appreciate the help.
Total Comments by Lars: 2
hi minimus,
is it possible to let the ads rotate e.g. after every 30 secs and not only after reload?
thanks…
Total Comment by Nay-K: 1
Look here…
Hi
I am having trouble adding an ad to my header using the following code:
I have set up a single ads place with a single ad in it.
To test that it worked within a post I added the following code:
and the ad was displayed.
However, when I have tried to add into the template (I am using WP-Clear and it has a settings page with space for ad code) the ad is not displayed and all I can see is the following text:
The source code of the page is as follows:
I am sure I am missing something really obvious but would welcome any advice.
Thanks
Mark
Total Comments by Mark: 3
Hey Mark, did you figure out a solution? I am having the same problem.
Total Comment by Jon: 1
Hi Jon – No I still have the problem which is frustrating as it is holding up the redeveopment of my site. If I don’t get a response or any pointers I may have to find an alternative plugin which I don;t really want to have to do. Regards Mark
Total Comments by Mark: 3
Are you sure that you can use the PHP-codes in the template this way? I see that on the template configuration page of advertisements you can use HTML or javascript tags only!
Mmm – that’s a good point! Can you think of a way round this – maybe inserting the code directly into the header template?
Thanks
Mark
Total Comments by Mark: 3
Yes, of course, this is the right decision…
@shawnjohnston Ended up using this one on a site recently: //t.co/4GQa4OOe Not super detailed reporting but works well.
Hello, looks like a great plugin, thanks for sharing your hard work. I am currently using basic banner rotators on a blog, and wanted to know if your plugin is able to display Flash banners (SWF). Sorry if this is already stated but I did not come across it on the features list, FAQ or comments in here 🙂
Total Comment by TheApe: 1
Not in this version (only third party codes). Look this version…
Hi,
I’ve just upgraded SAM to the latest version and now I am getting the errors
“Database table wp_sam_ads hasn’t been upgraded!
Database table wp_sam_zones hasn’t been upgraded! ”
Can you give any advice on how to fix this?
Thanks,
Total Comments by crashed: 3
Hi! I’m trying to figure out how to restrict an ad to a particular author or group of authors. The categories are all listed in the Ads Zone section, but authors are not.
A flow chart would probably help, to understand how to use this plugin to its greatest effectiveness.
Total Comment by Mike D: 1
Hi,
Great plugin, i use it for all sorts including displaying weather widgets based on tags in post! One idea though, would it be possible to move ads from one place to another, the only way i can see to do this now is to delete the original and create a new one
thanks
Total Comment by Mark: 1
Hi! Thanks for idea! I’ve thought about this feature of plugin, and even wanted to include it into the version 1.5 of SAM, but forgot. Sorry! Added to TODO list of next version.
Hi, I would like to be able to make all image ad hrefs be nofollow=”nofollow” – what’s the easiest way to accomplish this? Thank you!
Total Comment by Trae R.: 1
Any SEO plugin…
Can someone please help me. I am having difficulty with using “Simple Ad Manager”. I have created Ad’s Place within the widget. I would like to have the ad rotate with other Ad’s in the AD’s Place. If I could get some help or even directions on how to do this it would be awesome. Please help. Thank you…
Total Comment by G2Y: 1
Read this post…
I want to use this for both internal and external ads. Is there a way to set whether it opens that particular ad in the same window or a new window?
Total Comments by Brian Howard: 3
Now only for all ads (Settings), not for each ad…
Each ad would be very beneficial, so if they are just using ad to direct to another page on their site they can open in same window, but if they are advertising another site it could open in new window…..
Total Comments by Brian Howard: 3
I understand… Not in this version… I may add to TODO list…
Thank you; this is awesome! I would love to see the ability to set an ad as “disabled,” though – that is, not active, but not entirely trashed, either.
Tons of thought obviously went into this and there are lots of options!
Total Comments by Rachel Ramey: 7
Okay, silly me. I just realized that you CAN set an ad to inactive by setting its activity level to 0.
Total Comments by Rachel Ramey: 7
Is it possible to embed an ad block within an ad block? I have a roughly 400×150 space where I’m rotating out ads. Most of the ads are about that size. But I’d like to add another “ad” that is a block of three 125px square ads. Can I do this? If so, what would I put as the ad code, to make it insert the other ad block?
Total Comments by Rachel Ramey: 7
Hi
Great plug in but just one little bug. When you use the single ad widget it only opens the ad in a separate window even if you set your settings to use the same window.
The other question is are you likely to produce a pro version of this advertising manger with paypal integration for advertiser to pay online?
thanks
Kevin
Total Comment by kevin heath: 1
1. Bug is resolved in SAM 1.6
2. Good idea. I think about it
Is there a way to reset the statistics?
Total Comments by Brian Howard: 3
Ads->Ads Places: button “Reset Statistics” …
My error log is exploding, and I have no idea why. The errors don’t explain anything! How can I turn off the error reporting? At this point, I need to clear out tables from the database directly, or it will bog down my site.
Total Comments by Erin: 2
Try last minute version of SAM …
Thank you much! What sorts of errors does it pick up anyway?
Total Comments by Erin: 2
Hi,
It’s weird but when I enable SAM, post/page editor toolbars disappear and visual mode doesn’t work. I know it doesn’t make any sense but it only happens when I enable the plugin. When I disable it, editor come back to normal.
Total Comment by Um Ser Pensante: 1
by any chance does your plugin support restrictions based on custom taxonomies and terms?
Total Comment by Chris Woodley: 1
Can this plugin be used with Commission Junction ad codes as well?
This plugin looks great!
Total Comments by Anita: 3
I use it with CJ. Pretty much any code you can paste into it will work; it doesn’t even *have* to be ads.
Total Comments by Rachel Ramey: 7
Thanks Rachel,
I have a few ads set up, and in the widgets area in wp, I have the plugin positioned but they’re not appearing on the site.
The site is //www.click2cause.com/blog/ and I wanted the ads to rotate under the Recent Posts.
Any ideas as to why it’s not appearing?
Total Comments by Anita: 3
Can anyone assist me with this? I’ve got a few ads setup, but they’re not appearing on the site, if I have it as a widget.
I need to have this done soon, my client is waiting patiently for the solution for this.
Thanks
Total Comments by Anita: 3
Register on support forum and send me PM with registration data (account) created for me on you site.
__________________________________
Just back from vacation 🙂
I love this plug in but am having troubles with one thing. I am trying to upload a picture for an ad and it keeps saying it only accepts Jpeg, png and gif. I have tried downloading it in all three formats but it won’t let me. Is there something going on that is preventing this from working? I haven’t had that problem before. I have done several ads and this is the first time it’s happened.
Total Comments by Dawn: 2
Maybe ad has very big size …
No, the ad is the size it’s suppose to be.
Total Comments by Dawn: 2
Hello, Very Awesome plugin but bit confuse in some feature, Help required.
I have categories archives in my website.
i assign zone to show in “fabric” category.
The respective Ad is showing fine in “fabric” category archive page but when click on the post title
to ready whole content the ad is not showing i checked the zone settings there is :
Single Post Ads Place: setting it works but it also include the ad in other category when single post ads place to my category. I am showing through widget.
Guys hope you understand.
example see green ad on right side bar this ads assign for “fabrics” category:
//webdesignerart.com/textiles/category/fabric
But when i click any of the post title the ad not show:
//webdesignerart.com/textiles/invista-recognizes-commercial-success-of-lycra-fiber-with-w-technology
i don’t want to assign my ad by default in single post but want to show ad in single post which is categorized.
Hope guys you understand.
Total Comments by Mohummad Abdullah: 2
It is a logic bug made during developing object “Ads Zone”. I work over elimination of this bug.
Thanks for your quick response but need this solution done because category wise ads filter is important feature and in category single post where whole article show the ads not filter in assigned categories. Please do this waiting for your prompt support.
thanks
Total Comments by Mohummad Abdullah: 2
WordPress plugin Simple Ads Manager | SimpleLib //t.co/xkEod09T