A Widget / shortcode plugin to display Google Affiliate Network ads.
Both text links and image ads can be displayed. The widgets are
parameterized. There is backend access to the database table of links.
Links can be added and/or edited by hand or can be added in bulk from a
Tab Separate Value file, as downloaded from Links (Beta) tab from the
Google Affiliate Network page. A Tcl script is included to insert
E-Mailed links (link subscriptions). The Widgets and shortcodes are
parameterized for both sidebar display (vertical layout) as well as
leader/footer display (horizontal layout).
The ads are rotated, with the least viewed ads from the lest viewed
avertisers being shown in preference to ads that have been viewed more
from avertisers than have been viewed more. As ads are displayed,
their impression counts are incremented, which moves such ads to the
back of the list. Ads are displayed in iframes, which keeps the ads
contained on the page. Either widgets can be used to display ads in
side bars or shortcodes can be used to display ads in pages or posts
(both can be used if desired). A given ad unit can only display text or
image ads, not both. As a convience, a media insert button is available
on the post and page editor to generate and insert short codes to
display ad units on posts and pages.
The plugin provides an administration page to view the database of ads,
with the ability to add ads one at a time or in bulk (from a TSV file
downloaded from your Google Affiliate Network Links tab). There are
also administration pages to view ad impression statistics and merchant
(advertiser) impression statistics. The statistics can be downloaded as
CSV files. The plugin also includes a help page and a printable PDF
Notice: Google is planning on retiring the Google Affiliate Network. I am
going to stop working on this code. It is available for whoever wants to look
at it and maybe use it as example code or the basis of some other affiliate
Unpack the plugin archive under the wp-content/plugins directory and
then activate the plugin.
You can then add the widgets to your sidebar(s) and start adding in
links with the database manager. You can also use the shortcodes to
insert ad frames into posts or pages (you can use the Insert Ad Unit
media button to generate and insert these short codes). There is a help
page and a printable PDF user manual, that explains how to put ads in
the database and how to display ads on your blog pages or posts.
The link subscription handling script should be copied somewhere and
edited as needed (database access information). You’ll need to have Tcl
and mysqltcl installed. You will also need procmail (almost all Linux
system use procmail for their local mail delivery agent). Read the
ganlinksToDB.tcl file carefully.
A downloadable PDF user manual is available at gan_manual.pdf.
This manual provides detailed documentation on how to use this plugin.
Support is handled either with [Deepwoods Software’s
Bugzilla][bugreport] (submit any bugs and feature requests to the
Bugzilla) or though the [Deepwoods Software’s Support page][support]
(use this for comments or for general questions).
- Something does not work. What should I do?
Submit a bug at [Deepwoods Software’s Bugzilla][bugreport].
- I have another question that is not listed here. What should I do?
Contributors & Developers
“Google Affiliate Network” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Notice about Google retiring the Google Affiliate Network.
- Minor improvement in the insert ad unit [media] button (posts and pages).
- Update ganlinksToDB.tcl to support Google’s V2 e-mailed gan links (fixed).
- Update ganlinksToDB.tcl to support Google’s V2 e-mailed gan links.
- Include force update Database button.
- Fix missing database field.
- Deal with (stupid) Utf-8 characters in Google’s csv files.
- Minor bug in search/filtering fixed.
- Major re-write of the code.
All of the helper files moved to an includes directory.
All of the WP_List_Table classes re-written correctly.
The manual has been heavily revised and the help page has also been revised.
Things should generally work lots better and the admin pages should be
better behaved, with sorting and searching and working items per page
A fresh set of screen shots has also been created.
- Security and minor bug fixes.
- Google changed the link format file, again.
- Added Deepwoods Software’s Amazon wish list to the ways to support this project.
- Minor change to product ad searching — give more presidence to the
- Added matching in the description for product ad insertions.
- Google changed the format of the Export Links file! Code updated to match.
- Links can now be uploaded from either CSV or TSV files (code now uses fgetcsv()).
- Various small changes.
- Fixed typo in GAN.php
- Assorted minor fixes, including database field size change and minor link
- Fixed anoying bugs in GAN_InsertAdUnit (copy-and-paste error) and
GAN_Server (backwards loop exit condition).
- Fixed minor problem with dashboard widget.
- Updated localization.
- Fixed minor issue with the product ad server code.
- Added product ad unit support.
- Removed product feed => ShopperPress / Blog (This code will re-appear as
a separate plugin shortly.)
- Minor change: added merchant ID selection to the post and page Ad Insert
- Mantainence release. Plugin Sponsors is closed, disable it, and always
display the PayPal Donate Button.
- Add support for product feeds This code is experimental. Includes support
- Various minor bug fixes.
- Add selected merchant to widgets and shortcodes.
- Changed admin forms to use POST to avoid endlessly growing URLs.
- Fix bulk upload to handle unquoted image size strings
- Fix bulk upload to handle unquoted header strings
- Database creation and update changes.
- Documentation updates.
- Various changes to the database creation / update code (try to make things
work on WIMP/WAMP servers).
- Added filter code to the brief ad stats.
- Added PluginSponser code.
- Update localization
- Add merchant-level enable/disable
- Minor typo fixed
- Update Google Affiliate Network link
- Comment out debug code
- Fix ganlinksToDB.tcl to skip broken entries and to skip dupliicate link ids
- Add function to delete a merchant
- Add summary statistics to the top of the ad and merchant statistics pages.
- Update WP_List_Table classes to check for constructor name change.
- Improve the look of the dashboard impression stats widget.
- Various fixes to the readme file.
- Updated the internationalization.
- Major updates to the user manual, including the insertion of helpful
- Added convience link buttons to admin pages on the dashboard widgets.
- Additional date fix.
- Updates to the readme file.
- Minor updates to the dashboard widgets.
- Added admin tab navigation menu.
- Added media button to insert ad unit short codes.
- Additional Y2k / date fixes.
- Minor updates to the documentation, clarifying various points.
- Change Image Width column, dropdown, etc. to Image Size.
- Change Widths to Sizes in database stats.
- Minor documentation updates. Fix spelling errors.
- Maintenance release — fix problem with dates (a real live Y2K issue!)
- Maintenance release — hide dashboard widgets from non-priviledged users.
- Maintenance release — fix problem with add bulk upload form.
- Added in permission checks.
- Restored human readable date displays.
- Updated documentation in the readme.txt and the user manual.
- Fixed bug relating to ‘lingering’ edit/view state — make sure Add New
does in fact add a new element.
- Maintenance release — fix problem with date display.
- Updated readme.txt with a couple of simple FAQs.
- Maintenance release — fix problem with screen options.
- Updated internationalization files.
- Maintenance release — restore lost function (options page).
- Add in contexual help.
- Maintenance release — put the GAN login button back.
- Maintenance release — updated pot, po, and mo files.
- Changed Help submenu page to have the same permissions as the other pages.
- Changed the listing pages to use classes derived from WP_List_Table.
- Updated help page.
- Added ‘hardcopy’ documentation.
- Updated screenshots
- Fixed readme.txt and screenshots.
- Updated readme.txt
- Added screenshots
- Added target option to widgets and shortcodes.
- Added button to log into your Google Affiliate Network page
- Add target=”_top” to links.
- Added donate button
- Added stats download (as CSV)
- Add new in bulk (from TSV file)
- Removed extrainous (obsolute) button
- Added short codes
- Added help page
- New database structure.
- Minor changes to the stylesheets.
- Added in internationalization.
- Improved the ad stats display (include additional database fields).
- Changed the statistics reseting from ‘flush’ (delete) to ‘zero’, since
deleting rows from the stats tables is counter-indicated. Reseting the
statistics to a zero state (0 impressions, last date to the beginning of
the epoch) is what should be done.
- Fixed small database error (failing to delete empty advertisers).
- Fixed the delete expired function to properly clean up the stats tables.
- Added daily auto-expire function.
- Removed expired deletion code from ganlinksToDB.tcl
- Added stats view to admin pages.
- Fixed admin icon problem.
- Fixed a problem with the stats tables — they need to be populated,
partitularly for new ads!
- Updated tags in the readme.txt file.
- Moved ALL database operations to GAN_Database.php
- Added code to update the stats tables when ads are deleted.
- Added code to clean orphan ads and merchants from stats tables.
- Major changes:
- Ad are now served in iframes, which helps isolate the ad content from the
page content (avoids confusing search engines).
- Code broken up into multiple files (more modular).
- Impression counting added. Used to spread the impressions out across
merchants and ads. Also use for statistical reporting.
- Ad are now served in iframes, which helps isolate the ad content from the
- Tested under 3.1
- Fixed an endless loop issue, when there are too few ads available.
- Tested under 3.0.
- Minor update: pass along filter variables to edit and add row forms.
- Properly handle flow control in the case of failed edit row updates
- First official release.