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 minimus,
I want to ask about the feature “Flexible logic of advertisements rotation based on defined weight of each advertisement in group (Ads Place)” of this plugin.
I make some tests, rotation means at this time it shows ads #1, then refresh page, it will show the next ads? Do you have any idea if I want to make “rotation” means all ads at the same place display as a slide?
Ex. I’ve 3 ads at the same place (with the same role), it shows #1 ads after 10 seconds, show the next ads… instead of refresh page?
Many thanks for your help! 🙂
Total Comments by Tina: 3
Just back from business trip… I have to bethink…
New version (1.0.32) broken!!!!
Total Comments by Eric: 3
Auto inserting settings to ads place on before and after content are breaking the layout of the site!
Total Comments by Eric: 3
Resolved! Upgrade to 1.0.33!
Thanks for new version (1.0.33)! Good Job!
Total Comments by Eric: 3
Hi! I have just installed this plugin but I can’t create any Ad Places. I enter all the information (title, description, size, Image URL and target URL), then click on Save and the “Ads Place Data Updated” dialog appears, however no Ad Place is added. I have tried several times already but nothing happens, there’s still no data in the Managing Ads Places menu. Am I missing something?
I’m using WordPress 3.2.1, btw.
Thanks!
Total Comment by Mary: 1
Try to reinstall plugin… To my mind database tables were not created…
Hi,
I’m having problems with SAM. Whenever I activate the plugin, my Visual Editor buttons arent showing up, the media buttons at the top are all okay though. Tried reinstalling the plugin but to no avail, please help. I dont know why it is happening and Ive tried disabling all my plugins and found that SAM was the one causing it.
Also, just a suggestion, can you please add an option to use “nofollow” when using the Image mode?
Thanks!
Total Comment by Candie: 1
Hi, how to get random ads?
i’m using this shortcode but always show me the ads in the same order.
Thanks!
Total Comment by Gorgsus: 1
Your plugin is great for ad integration in my WordPress sites.
But I’d like to advice you that you have quite a lot of notice PHP errors in your code and I find that it’s the major flaw of your plugin. I’d call it perfect if not for those.
Total Comment by nebulousGirl: 1
Not installed the plugin yet, but most likely I will.
It definitely has everything there is, except of ONE little, but very important in my opinion thing (unless I missed it in description):
EMAIL NOTIFICATIONS !!!
When ads are sold and set to run for defined period of time, It would be very nice to send email notifications to ads ordering party, at the start and even more importantly at the end of the run. First of all, if such note is co-emailed to blog admin, he/she will no that ad space became available. Secondly, such simple notification to the advertiser will prompt him/her to place additional order. Advanced ad expiration notice would be great as well, as this would allow advertiser to append extra advertisement term and have ads served without interruption.
Ability to edit the text of such notifications is of the essence too. This is where blog admin can exercise various “tactics” to get advertiser to renew.
Simplest addition for the plugin would be to collect advertiser’s email during ads order placement, more advanced one could be a creation of user based ads management panel for such advertiser.
Best wishes!
Total Comment by BlogMinded: 1
Exelent! Good idea!
How long are statistics saved for an ad? If the ad is set to expire, will the statistics on that campaign remain until the ad is deleted?
Total Comments by Whitney: 2
Yes! But you can clear statistics…
How do the statistics work when default ads have been assigned to ad places. Do the statistics track the PLACE or the ad?
i.e., if someone were to run a default ad in a place for 2 months, then choose a new default ad how would the stats for the first ad be displayed? And where would one find them? Or are the stats for that PLACE only, and the new ad would continue to rack up stats starting from the where the first ad left off?
Total Comments by Whitney: 2
I have installed your plugin and started using it. I am very pleased with it, because I was looking for an ad plugin solution that counted clicks from our custom made ads for clients. However, we envision a lot of custom ads to be created over the next year and wanted to know if there is an easy way to let the clients know how many clicks they have gotten without us having to go into WordPress each time for them, copying the data, and pasting it into an email for all the advertisers. Is there some automated way to do this?
Total Comment by Mindy: 1
Added to task list… Thanks!
+1 to Gorgsus
Is it possible to show ads randomly? Now they selected ordered by id…
Total Comment by Vladimir Lapshin: 1
I do not understand the question…
Hello,
If we create an ads place, and content multiple ads..
The ads are displayed on order of the creation.
It begin with the first ads.. and begin always with the same ads
and continue with the second ads…
Is it possible to display randomly ?
Total Comments by Patrick: 3
Sorry,
Perhaps a cache… Now it’s display randomly…
Thanks
Total Comments by Patrick: 3
Hi,
i get a strange Message on mi site:
Warning: Invalid argument supplied for foreach() in… …plugins/simple-ads-manager/ad.class.php on line 471
and a second Message:
Warning: Invalid argument supplied for foreach() in … …/plugins/simple-ads-manager/ad.class.php on line 452
Do you know this? Any ideas?
thanx for your help!
Total Comment by MIkk: 1
Do you use WP 3.0 + ?
Hi Im trying to put the ad in my template using the output functions. However, when I add it to the functions.php the file breaks. Can you please help me understand where the output function and usage code must go? I presume the output function goes in functions.php and the usage code goes in the template file where I want it to appear – eg header/single etc.
Ive also tried to insert it using <?php echo do_shortcode(‘‘); ?> but that didnt work.
I hope this makes sense
Total Comments by stemie: 3
Hey mate,
congrats for your work.
I’ve installed your plugin on my wp 3.2.1. and there is an important issue.
When an article belongs to a category with Greek name, the ad is not appeared. For English category names everything seems ok.
So, considering that I can’t write a Name or Description for an ad in Greek language in your plugin (it shows ??????? when I click save) neither, I suppose it’s an encoding issue. Maybe if you turn it to UTF everything is gonna be alright.
Check it out. 😉
Since you have time let me know if there is anything I can do to make it work.
Thanks
Total Comment by Tassos: 1
Плагин великолепный, спасибо! Но немного разочаровало отсутствие возможности использовать Google Custom Search, в виде виджета (было бы великолепно). Взамен стандартного поиска. Даже не столько в силу монетизации, сколько в качественности поиска.
Вы сможете добавить такую функциональность, или считаете это не нужным?
Total Comments by Alex: 4
А Вы не пробовали вставить код поиска в качестве кода объявления?
Нее, не пробовал, сообразиловки не хватило 🙂 Сделал с помощью гаджета от гугл..
Total Comments by Alex: 4
Oops… Plugin does not working in WP 3.3 When activated Plugin I go to the tab “Settings”, but some managment blocks are not visible, and I can’t him drag to up
Total Comments by Alex: 4
WP 3.3 пока ещё в разработке … Если Вы имеете в виду 3.0.3, то, увы, в требованиях плагина указано: 3.1+ (используется пара функций появившихся в WP 3.1)
Да, речь идет о 3.3; Ну что ж, придется ждать офф релиза..
Total Comments by Alex: 4
this plugin is very good, but it didn’t support chinese language.
Total Comments by usin: 2
Why?
when i input chinese, Garbled should be showed.
Total Comments by usin: 2
is it possible to display the same ads place on Home page AND restrictive categrories ?
Home Page : display all ads Randomly
Category Intermediate : display Randomly all ads of sub categories
Category : Display only the ads of this category
If I configure restrictive category point 2 & 3 works, but nothing come on Home Page
Thanks
Total Comments by Patrick: 3
That’s the best plugin I’ve seen so far about ads!
Thank you!
I have one question, the click tracker seems to count only clicks from Firefox(tried IE and Chrome), am I forgetting to configure some option or something? Is there a way to make the target link become like ‘mylinkRedirect?id=55’ for better tracking the click?
Yours,
Diogo
Total Comment by Diogo: 1
Help me. I can count how many click on flash banner when i use “Code mode”. How i can have a click data?
Total Comment by Anh: 1
Please can you help me, I never get a reply 🙁
A desperately need the the sql code to create the tables for the plugin in as I can create them using the plugin for some reason.
I would really appreciate a reply.
I cant donate until I get this working and to get it working I need to create the tables.
Please can you respond just this once
Total Comments by Steve: 3
Sended…
Hi!
I noticed that this plugin conflicts with the default wordpress WYSIWYG editor (tynimce). When I switch from html to visual mode, the TinyMCE panel disappears.
Total Comment by Andrey Boitsov: 1
I have the Ads running but can’t figure out how to insert “Dates”, get the Page that shows, impressions, hits, and prices, etc. I’ve read this but I’m still unable to figure it out. There is also not a “DrawAds” option in my WordPress page. Can you please help? I have high end Advertisers and cannot supply them accurate reports. No reports are visible.
Total Comment by Dawn: 1
Hi peeps 🙂
How can i post 2 ad next to each other
I tried the BLOCKS but it’s still showing under each other?
Total Comments by Fady Hanna: 3
Not enough space to accommodate two ads side by side. Try to reduce the values of margins and paddings…
Thanks that worked
Another question please can i display under menu and appear on all pages?
or only on side?
Total Comments by Fady Hanna: 3
If you say about widgets, YES…
I am not sure i understand you
Yes i can display 468X90 on the top (under Menu bar) or ……?
If yes please tell me how or where is the guide for that
Regards
Total Comments by Fady Hanna: 3
If I assign 4 ads the same weight in a 4 ad block, the ads no longer rotate on page reload. The ads are displayed in the order created. If I remove 1 ad, then I get the rotation back however 1 ad displays twice. Any way to get same 4 ads to show on page reload but rotate their position each time?
Thanks,
Total Comments by h528: 4
Is there anyway to use the feature “display ad by page id” and also get them on the “home page”? My home page doesn’t have a page id and if I use the feature of checking the “home page” then I can’t use the feature below it of “allowing ads on certain pages with page id”.
Thanks,
Total Comments by h528: 4
Please add Peel Page Ads and Background Ads to Simple Ad WordPress! Thanks!
Total Comment by Bapjo4: 1
Thanks minimus, awesome plugin!
I am using the code to manually place my ads, It works very well in Firefox, Safari, IE and Opera. But Google Chrome seems to struggle with it. It will sometimes display 50% of the ads, sometimes 25% and often no ads will show up.
Any ideas why this may be happening?
Thanks,
Total Comments by DKeff: 4
@frillycoconut I find that Simple Ads Manager is a great WordPress solution: //t.co/UfhYUxOx
HI Minimus,
Is it possible to add rel=nofollow to the links?
Total Comments by h528: 4
But how to add in php file, which code to use
Total Comment by rajiv: 1
Read “Output functions” section…