Perl Ad Server

Welcome to the Perl Ad Server.

This site gives you a simple way to help to advertise Perl events.

There may well be an advertising banner at the very top of this page. You can have one like it on your web site too.

Simply add a small piece of Javascript to your site and we'll handle the rest. The Javascript looks like this:

<script src="https://perl-ads.perlhacks.com/perl-ads.js"></script>
            
          

If we're advertising something, then the banner will appear. If we're not currently running any ads, then nothing will change.

We may be running more than one ad simultaneously. Your site will display one at random.

Feel free to remove the Javascript whenever you like.

More details

If you want more control over the placement or formatting of our ads, then read the sections below.

Placement

The default behaviour of the Javascript is to add the ad to the very top of the page. If you want to put it somewhere else on the page, then create a <div> element with the ID "perl-ad-target" and the ad will be inserted there.

CSS

In order to make it easier to style the ads so they fit in with the look and feel of your site, the HTML elements that we add to your site all have CSS IDs:

  • The enclosing <div> has the ID "perl-ad"
  • The <span> that contains the title has the ID "perl-ad-title"
  • The <span> that contains the description has the ID "perl-ad-desc"
  • The <span> that contains the link has the ID "perl-ad-link"

If you find you need anything else, then please raise an issue and we'll see what we can do.

Advertising

If you want to advertise with us, it's really not very high-tech. You have two options:

JSON format

Entries in perlads.json should have the following attributes:

  • title - the title of the event
  • description - a brief description of the event
  • link - a link to the web site for the event
  • publisher - an identifier for the organisation publishing this ad
  • start (optional) - the date when this ad should start appearing
  • end (optional) - the date when this ad should stop appearing

The optional start and end attributes are so the people running the ad server don't have to add and remove the ads in real time :-)

In the future, the publisher attribute may be used by websites to filter the ads that are published on their sites

Date format for ads

The JSON objects for ads can include optional start and end keys to specify the date range during which the ad should be displayed. These keys are optional, but if provided, they must follow the specified date format.

The date format for the start and end keys is YYYY-MM-DD. For example, a valid date would be 2025-06-27.

Ads without start and end keys are considered always valid and will be displayed regardless of the current date.

Code copied to clipboard!