Toura/mulberry — Issue #315: Support ads
Author: greenideas
Created: 2012-02-02 17:20:41+00:00
State: open
Labels: Feature

Implementing support for ad tags in Mulberry & MAP would involve the following steps:

## Mulberry side

* An Ad component - All this needs to be is a container with and iframe whose src attribute we can set programatically
* All existing page_defs need to accomodate the presence of an ad
* Implement a way for users to specify ad URLs.

## MAP side

* A feature flag in MAP to allow turning ads on/off
* A field in MAP to allow specify URL(s) for ads
* If ads may be turned on/off for individual pages, this functionality needs to be added

## Some additional thoughts/questions

Should ads be associated with pages in the same was as other assets? That seems the most straightforward, but it also requires a lot of duplicated effort (i.e. adding the URL to each page individually). Alternatively, a URL could be specified in, config.yml and each page could set a boolean that would turn ads on/off for that page. If there were a default value for this, it wouldn't be necessary to set that value on every page. If we went this way, we'd want to figure out which state makes the most sense as a default.

As imagined above, this ad implementation delegates all of the work for serving ads to the user. It also falls on the user to add some server side functionality to rotate the ads that are served from the single URL they provide to Mulberry. Are these acceptable assumptions?

Do we need to provide a way to specify dimensions for ads? Does it need to be on a per-ad basis? Obviously, we would be in control of the dimensions of the iframe, so there needn't be any concern for breaking the layout, but if we want to eventually support different ad sizes for different devices, we'll need to address this.