HTML and CSS Reference
In-Depth Information
HTML for creative:
<a href= MACRO target="_blank"></a>
As you can see, it's much more scalable to develop in this fashion rather than update numerous creatives when
changes need to be made down the road.
Working with XML and JSON
By now you have a fair understanding on how ads can be dynamically targeted to you as a user from an ad server point
of view, but let's shift gears a bit and talk more about the technical aspects of dynamic ads as they relate to HTML5
and the open Web. This would be particularly on the creative end of things where you can manipulate the creative
elements of your ad using data. But before you head down this path, you need to be clear on a few ways about how
your creatives can work with external data from various services. Two of the most common communication layers
when working in HTML5 are Extensible Markup Language (XML) and JavaScript Object Notation (JSON). XML and
JSON are widely adopted among the industry in that they're used in many RESTful APIs for various data endpoints.
For good information on restful apis, visit .
Using a common and universal language that all lower-level code languages can understand and parse allows
for easy adoption, communication, and ubiquity among web developers. Anything from bringing in a brand's Twitter
feed to pulling in a stock ticker, or even using a weather feed or local retail products, can be pulled into the ad creative.
It's all traditionally done using XML or JSON data, and the following sections are geared toward showing the best way
to work with external data providers with XML and JSON.
XML is probably the most common language for web services. I'm not going to get into the nitty-gritty of XML, but
in the ad world, an advertisement will make a request to some web service by way of an HTTP request, usually with
some necessary URL query parameters. The response that the web service provides to that request will traditionally
be in XML format. Listing 11-1 showcases a request and XML response from Yahoo's open weather service.
Listing 11-1. Yahoo's Weather API XML Example
HTTP Request:
Server Response:
<query yahoo:count="1" yahoo:created="2012-08-01T23:15:47Z" yahoo:lang="en US" xmlns:yahoo=
" " >
<title>Yahoo! Weather - Conshohocken, PA</title>
forecast/USPA0326_f.html </link>
<description>Yahoo! Weather for Conshohocken, PA</description>
<lastBuildDate>Wed, 01 Aug 2012 6:34 pm EDT</lastBuildDate>
Search WWH ::

Custom Search