MobileWebAdz Ops sites

PHP, Memcache, Nginx, HTML, Less/CSS, Bootstrap

MobileWebAdz is one of the world’s leading mobile advertising network and forms part of the MobGroup. Their operations team had a need for a collection of sites to run trafficking tests using real traffic from the ad network across multiple territories and channel.

Most tests involved new banner formats and A/B split tests. The sites had to render pages tailored for multiple device types (lite, smartphone, Desktop, Tablet) to ensure that the tests ran as well as possible.

I was assigned to this project to take the existing testing site (dimisporncave.com) which had only a smartphone and lite site (featurephone) version and to create a code base that could be used across multiple websites/brands with each having multiple layouts based on device type.

Another objective was to switch from using static content (videos and pictures) and to integrate a content API from a sister company (MobStuff) which would allow for automatically updated content.

Technology

The technology employed for this project were: PHP (for rendering of page templates and server side logic), Memcache for server-side caching of requests to the content API, Bootstrap for providing the grid layout and site structure in the desktop and tablet templates, the LESS CSS preprocessor for generating brand specific CSS (colours) and plain text .ini files for providing the per brand/site configuration which is loaded by the PHP codebase.

Device detection

The initial layout a user saw on a web page was determined by a combination of server-side user agent (UA) detection and previously saved user template override preference where the choice is stored in the browser/session cookies if supported.

API integration

I created a PHP cron script which queried the content API nightly and stored the response in Memcache for use in serving all page responses for the next 24 hours. This approach reduced the number of queries to the API (which could take a few minutes given the huge amount of content available, and that each site had its own specific queries regarding content type/level).

Ad Network integration

Whilst these sites where for internal testing purposes the sites needed to have ad network integration (both from Reporo/MobileWebAdz and from third-party networks). I did this work of integrating the various ad networks (Ero, Juicy Ads, MobAfill).

mobilewebadz_ops