HTML and CSS Reference
Dynamic Advertising with HTML5
Dynamic advertising is nothing new in today's world. The concept of rich creative paired with relevant messaging
and data is something users and marketers have grown accustomed to seeing. However, this sort of dynamic behavior
was traditionally done using Flash and the ad would reference an external web service to update its creative contents,
which could be updated text, new images, or even a new ad experience altogether. In this chapter, I'll focus on the
same concepts that helped shape the dynamic advertising market, but I'll do it with a primary focus on HTML5 and
related open web technologies.
Let's take a deeper dive into the topic of “dynamic” and figure out how you can leverage external data, publisher-
passed data, public and private web services, and various APIs to manipulate creative at ad-serve time. I'll cover
locally targeting users based on geolocation as well as demonstrating that advertising doesn't have to be “baked” in.
I'll review how ad servers and ad-serving technology use custom macros to help speed up runtime dynamics, and
I'll also showcase how ads can be timely, relevant, and efficient, creating “hot-swappable” content on the fly. Using
these techniques, I'll cover the technologies in which your ads will leverage dynamic data including XML, JSON, and
Let's kick things off with the most basic forms of dynamic advertising, which are the dynamic properties of the ad
server. Typically, ad servers can place delivery rules for the users requesting the ad content. This sort of relationship
goes like this: “Hey, ad server, I am a user on an iPad in landscape orientation. Deliver me a creative that isn't Flash
based and is sized correctly.” The ad server will then double-check that the user is in fact on an iPad by doing a
browser string (user agent) lookup and then will deliver the appropriate creative type based on the request. Figure 11-1
explains the request-response relationship between the user and the ad server.