WordPress plugin Simple Ads Manager

AdvertismentUntil 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.

Support Forum

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

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

  1. Upload the plugin folder to the folder /wp-content/plugins/
  2. Activate the plugin on the Plugins page
  3. Configure your plugin to meet your needs
  4. 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:

  1. Show ad on all pages of blog
  2. Show ad only on pages of this type – ad will appear only on the pages of selected types
  3. 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

  1. 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
  2. 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.

[sam id=1 codes='false']
  • 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.

[sam_zone id=1 codes='false']
  • 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.

[sam_ad id=1 codes='false']
  • 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.

[sam_block id=1]
  • 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:

  • 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.

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

Simple Ads Manager
Simple Ads Manager is easy to use plugin providing a flexible logic of displaying advertisements.

Author: minimus, version: 2.2.80, updated: April 17, 2014,
Requires WP version: 3.5 or higher, tested up to: 3.9.
Download (154 341 hits) (69 votes)

© 2011 – 2013, minimus. All rights reserved.


About minimus

Local and Web Programmer. Development using Object Pascal, C#, SQL, PHP, Javascript.

Comments

  1. Hi Minimus
    Is there a way I can make an ad-block to be displayed as an alternative in an ad-zone.
    Alternative option would be to display an ad-block in an ad-place via code mode. That way I could use the ad-place in the ad-zone to display an ad-block.
    Is there a line of code in the plugin I could change to make this work, as a quick fix?
    Best regards,
    Andri
    Total Comments by Andri: 3

  2. I found this errors on google chrome console log when I opened sam zone editor

    Because of it, image uploader in zone editor doesn’t work. But those files it itself are exists but cannot be loaded. Do you know something about this? 
     
    Total Comments by Hilaladdiyar: 2

    • What errors detects Google Chrome?

      • I’ve inserted the screenshot using this comment form editor, but it seems wordpress removed it. You can see the error here http://www.seputarukm.co.id/uploads/2014/01/sam-error.jpg. All styles dan javascript files cannot be loaded. But, it just happened in chrome, and works fine in other browsers. Do you know something about it?
        Total Comments by Hilaladdiyar: 2

  3. Having issues with 3.8.1 and a RocketTheme pack. Seems it all worked fine before the upgrade to 3.8.1 and the latest RocketTheme/Gantry Framework. Updated it and BOOM the ad manager is broken. If I place them in widgets for the sidebar(s), it screws up all the subsequent sidebar alignments and does not show the ad. I’ve tried re-adding the widget and no such luck. Also seems that now the browser will not recognize the folder/files that were in the plugin from a year ago. Not sure if that’s a side effect or an error or what. I can pull the files u p manually in the browser, but even a simple image embed won’t be recognized by the site/browser.
    I’m not some script genius, and considering this is a client site, it’s not a good thing :) Any help/revisions would be very helpful. Thanks!
    Total Comments by Tony Stevens: 2

  4. kevin phillips says:

    Great plugin!  Is there anyway to show an ad zone on a single page post, that is specific to the category the post is in?  I have the ad zones showing for each category, but once you dril down to the the single post page, it just shows the default ad.  Any way to set the ad for each category-signle page post, like you can do for the cateogry view?
    Total Comments by kevin phillips: 2

  5. Сергей says:

    Здравствуйте! Как я могу вывести все баннера, добавленные в Ads Place? У меня в Ads Place (id = 15) 5 баннеров. Хочу вывести их все на одной странице с помощью php. Пишу if(function_exists(‘drawAdsPlace’))drawAdsPlace(array(‘id’=>15),true)  , но выводиться только один. Спасибо
    Total Comment by Сергей: 1

  6. Working on a site with banner ads, but i don’t want to show double ads in an ad block is there a way to control that? And if i have a block of 6 places and i have 5 ads that it doesn’t fill in the last one with an ad that’s displayed there already?
    tnx.
    Total Comment by Tammo Haan: 1

  7. kevin phillips says:

    Minimus are you available for contract work?  I have a few jobs i would like to use simple ad manager on, but need to have the ads show up on on single posts, within their category.  I would like to use the plugin on future jobs going forward and i would need the feature to do this.  thanks, kevin
    Total Comments by kevin phillips: 2

  8. It has been impossible for us to access the Ad Places in the plugin. Any other part is OK to go to, but whenever we hit Ad Places, we get this:
    Gateway Time-out
    The gateway did not receive a timely response from the upstream server or application.
    Contacting our hosting provider for some solutions, they looked into and replied this:
    I have re-created the issue and it seems that the plugin is hitting the server limits for maximum timeout. I would advise that you check with the plugin developer on what could be causing this slow responsiveness from the plugin. Please update this ticket if we can assist with the issue further.
    Any suggestions? Thanks a lot
    Total Comment by Pedro: 1

  9. Hi!
    When I disable “Include Clicks in the advertiser report” clicks are sent nevertheless. Could you fix that bug please? Thank you very much!
    Total Comment by Franz Sauerstein: 1

  10. Iam getting a very strange error :
    Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /var/www/vhosts/street-stars.net/htdocs/wp-content/plugins/simple-ads-manager/sam.class.php on line 453 Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /var/www/vhosts/street-stars.net/htdocs/wp-content/plugins/simple-ads-manager/widget.class.php
    We moved recently to a new domain and upgraded to the latest WP version.
     
    any suggestions?
    Total Comment by streetstars: 1

  11. By using this plugin, would i be able to set a different ad for each author? e.g. I have an author called “Juan”, and i want Juan to have his own ad shown on his articles, so he would make some money. I also have an author called “Marcos”, and i would like to have the same kind of possibility (to him set his own ad) for him. Puting on short, each author should have his own ads shown on his articles.
    Sorry if it to obvious… i definitily saw something about author on the description, but couldnt understand it fully. Thats why i’m asking.
    Total Comment by Diewgo: 1

    • 1. You can set extended restrictions for ads (Show ad only in single posts or authors archives of certain authors)
      2. If you want each author set his own ads himself, set value of “Minimum Level for access to menu” to “author”…

  12. Здравствуйте!
    Поставил Ваш плагин на наш новый сайт и заметил, что перестала работать вкладка HTML в визуальном редакторе и + пропали кнопки в нем. После отключения плагина – все работает. Скажите, пожалуйста, как скоро Вы сможете посмотреть эту ошибку? Заранее спасибо!
    Total Comment by Александр: 1

  13. I need help. I’ve been running your software for months now. I have about 40 Ad Places. When I try to access the Ad Places page my server does an Internal Error. I can access all other parts of your software admin pages, except the Ad Places. I have increased my PHP execution time to 60 seconds but it doesn’t help. It seems that I have too many Ad Places for my Dedicated Virtual server to handle? What can I do to speed things up, and get the Ad Places admin page up?
    Total Comments by John Manzione: 5

    • What in Error Log of server?

      • There are no errors in the log. None. However, I did use the settings page to only show me 5 Ad Places at a time and it now works, but it takes the maximum amount of time to show them. I love this script, and would gladly pay for it again, if it were faster, learner, and if you ADDED those WordPress Buttons that would allow us to delete more than ONE ad a time. 
        I have not cleaned out my Ad places in a while, so in order to speed up the page loading I took Saturday to delete the ones that were no longer active. It took hours because I couldn’t “choose” more than one at a time. Any chance that option will show up soon?
        Thanks for all your handwork, it has to be a time-consuming script for you!
        Total Comments by John Manzione: 5

  14. Minimus, I’d like to place a super leaderboard ad place above the banner logo at the very top of my site. I’ve created a place (id=3), but can you show me example php code on how to make the ads appear? Thank you!
    Total Comment by Lee Smith: 1

  15. I have tried your support forum but havent gotten an answer please help.
    when I go to the admin and click ads places then click view ads it appears to time out…it doesnt show anything but a blank frame in the page  this makes it impossible to delete or edit existing ads  there are 21 ads in the ads place please help with this  TIA
    Total Comment by Mike South: 1

  16. Hi,
    we still in trouble with Internet Explorer, nothing showned on sam div

    Simple Ads Manager 2.2.80
    Internet Explorer 11.0.9600.16438

    Any clues about it?
    Thanks.
    Luca

    Total Comment by Luca: 1

  17. Hi 
    When opening the ad-places page or opening an ad-place page to view the ads it can take up to a minute to open and the hole website and database are down and inaccessible while it´s opening.
    I have 27 ad-places and there are about 130 ads in the system (7 active).
    Can you think of something that could be the issue?
    WordPress Version: 3.6.1
    SAM Version: 2.2.80SAM DB Version: 2.6PHP Version: 5.3.28MySQL Version: 5.1.54-logMemory Limit: 128M
    Thanks,
    Andri
    Total Comments by Andri: 3

  18. Franz Sauerstein says:

    Hi!
    I am using an Woothemes Theme which has an built in ads-place for Adsense. However I cannot get it to work with SAM-php-code. It seems I need to use javascript. How would I do that?
    Total Comments by Franz Sauerstein: 2

  19. hi.
    your plugin bad align in my wordpress.
    my wordpress core is rtl.
    please answer me.
    i can translate your plugin in Persian(Farsi) Language.
    Total Comment by RTL WordPress: 1

  20. Carolina says:

    I have a problem in nexus 7, the ads don’t display on it.
    Total Comment by Carolina: 1

  21. Hello,
    thanks again for the plugin! Just a question:
    Is the mailer working? the one to send reports of the ad activity… where does it send the emails? In 4 months I have never received a report.
    Is there the possibility to set the email in the options or it sends the message to the default email?

    Thank you,
    Diego
    Total Comments by Diego: 8

Trackbacks

  1. minimus says:

    @minimus: WordPress plugin Simple Ads Manager http://bit.ly/gWIwlx

  2. minimus says:

    WordPress plugin Simple Ads Manager 0.4.16 released! http://www.simplelib.com/?p=480

  3. junichi_y says:

    WordPress plugin Simple Ads Manager | SimpleLib: http://bit.ly/h2sfi1

  4. [...] The full guide to Simple Ads Manager written by it’s developer is here http://www.simplelib.com/?p=480 for if ya wanna go further into it’s functionality. I’ve not included how to use Ad [...]

  5. [...] The full guide to Simple Ads Manager written by it's developer is here http://www.simplelib.com/?p=480 for if ya wanna go further into it's functionality. I've not included how to use Ad Zones as I [...]

  6. Chris Lema says:

    @frillycoconut I find that Simple Ads Manager is a great WordPress solution: http://t.co/UfhYUxOx

  7. [...] Simple Ads Manager WP125 AdRotate Ozh’ Who Sees Ads [...]

  8. WordPress plugin Simple Ads Manager | SimpleLib http://t.co/xkEsKAaN

  9. Olof says:

    WordPress plugin Simple Ads Manager | SimpleLib http://t.co/3BKLs5uX #wordpress

  10. Finally found a great #Wordpress banner advertising plugin from @minimus called Simple Ads Manager http://t.co/m0elMCrV > Works great!

  11. @shawnjohnston Ended up using this one on a site recently: http://t.co/4GQa4OOe Not super detailed reporting but works well.

  12. WordPress plugin Simple Ads Manager | SimpleLib http://t.co/xkEod09T

  13. Theme Hunter says:

    WordPress plugin Simple Ads Manager | SimpleLib: http://t.co/Ku6ar8Tz

  14. WP Goat says:

    WordPress plugin Simple Ads Manager | SimpleLib http://t.co/Jj6SXPNQ #wordpress #wp

  15. rtwordpress says:

    RT @wordpressgoat WordPress plugin Simple Ads Manager | SimpleLib http://t.co/eCsEwbsH #wordpress #wp

  16. [...] по этому названию через поиск плагинов WordPress или на странице разработчиков. Русский язык [...]

Speak Your Mind

*