OpenX and Campaign Monitor banner delivery for automated RSS feed reading

Written by Peter Davies on .

We had a curious issue making OpenX and Campaign Monitor work together to deliver alternating OpenX delivered banners between RSS feed-based news listings. The complication arose when the repeating banner code caused the same banner to load on the page for every banner position within the newsletter because we couldn't change the "cb" cache busting parameter:

<a href="http://ads.domain.com/www/delivery/ck.php?n=999999&cb=1234" target="_blank">
<a href='http://ads.domain.com/www/delivery/ck.php?n=999999&cb=1234' target='_blank' cm_dontconvertlink >
<img src='http://ads.domain.com/www/delivery/avw.php?zoneid=1&n=999999&cb=1234' border='0' alt='' cm_dontimportimage />
</a>

In Campaign Monitor the RSS feed lister look like the following snippet, but there is no functionality for inserting random numbers, or even a custom RSS feed item which could have been the article ID which is unique per post:

<datarepeater type="rss" src="http://www.domain.com/index.php?option=com_rss&format=raw">
<layout>
Posted on <rssitemday></rssitemday> <rssitemmonthname></rssitemmonthname>, <rssitemyear></rssitemyear></p>
<rssbody paragraphs="all"></rssbody>
</layout>
</datarepeater>

With the detail on the available functions are here: http://www.campaignmonitor.com/create/rss-to-email/

The initial solution was to create a script that delivered an OpenX "cache buster" value every time it loaded:

The issue still occurred where the e-mail client would display the same banner for each iteration of the Campaign Monitor datarepeater element.

The solution was to use the "layout" feature as described here http://www.campaignmonitor.com/create/rss-to-email/#layout If we had 6 different banners, we could have 6 different layouts that the repeater would loop through when rendering the posts. Each layout could connect to a different zone containing just 1 banner.