Reusing DFP slots within infinite scroll

Infinite scroll on the index view and article view seems to be all the rage these days. TIME reports their bounce rate went down by 15 percentage points with their redesign. At some point in the discussion, AdOps will raise their hand and say “how can we get ads in the scroll experience?”

Short answer: with code! Because AdOps only wants to create a limited set of ad slots, and Google DFP slots can be used once per page, you’ll need to display the slot first, and reload it for each subsequent use.

The slots are added dynamically as the user scrolls. If a given slot has already been loaded once, then the next time we try to use it we actually pull the first instance over to our new slot, reload it, and add a placeholder for its old position so the page height doesn’t jump. We can use the same trick scrolling back up, simply replacing the placeholder with the refreshed ad.

Google’s documentation has a similar example that’s a good reference point for methods, etc. Pay attention to googletag.refresh( unit ); and googletag.pubads().refresh([unitInstance]);unitInstance is what’s returned by googletag.defineSlot(), so you’ll need to store that somewhere for later reference.

I look forward to hearing about the straightforward approach I missed…

Status

Off to Philly today for SRCCON, a gathering of some of the nerds who make the technology behind the news. I am so excited! For years, CMSes, publishing workflows, and the unsexy but very mission critical technologies have been my passion. Yet most of the conferences, online discussion, etc. have skirted around the topic, in part because legacy organizational structure hasn’t let the hackers get to work.

Funny how things go if you stick at it long enough. Washington Post and Vox have made great leaps forward, and convinced executives everywhere that change is possible. Hell, even The New Yorker relaunched on WordPress two days ago. NBD.

Back to Portland Saturday night, off to Sunriver Sunday through Wednesday, and then to New York for WCNYC Thursday through the following Wednesday. REST API retooling here we come!

Status

We had our 6 oz toothpaste container taken from us at KEF just now — Leah mistakenly put it in the bin. When I asked why it was taken, the security agent explained there was some greater than 4 oz rule, even when it was obvious there was less than 4 oz of cream in the tube.

This logic is flawed in a couple of regards. First, if I really wanted to get more than 4 oz of liquid on a flight, I could just separate it into two or more containers. Second, the ziplock bag they generally recommend putting all of your liquids in is far larger than 4 oz. I could just fill my ziplock with a number of full 4 oz containers.

When the best explanation an agent can put forth is "well, that’s the rule", something has gone horribly wrong with aviation security. It doesn’t take much to circumvent the system.

My first speeding ticket

On Monday afternoon, coming into Ísafjörður, I was pulled over for speeding — my first time ever, surprisingly. Naturally, I decided to contest it.

The way to Ísafjörður from Hellnar is a gnarly three hour gravel road. Before hitting town, you’ll drive through a long (~10 km) tunnel with a 60 km/h speed limit. After the tunnel, the speed limit goes back up to 90 km/h. And then, kilometers before you enter the city proper, it drops back down to 60 km/h. But I missed that sign (crying baby and all). Most of Iceland is 90 km/h unless you’re within a city’s limits.

We took a pit stop between the tunnel and town at Bonus to pick up groceries for the week. Within a couple of minutes out of the parking lot, a police car passed us, pulled a U-turn, and flashed its lights. Busted!

The police asked me to get in the back seat of the police car because they video record the interaction. They explained the 60 km/h speed limit and showed me their clocked speed, which I didn’t disagree with. I was going 82 km/h because I thought the speed limit was still 90 km/h. I explained I wanted to contest the ticket.

In the US, my understanding of the game is this: get a speeding ticket, contest it in front of a judge, get anywhere between 0-100% off. Typically it’s at least 50% off. And that’s if you formally get a ticket — if you have a cute baby in the back seat, the police will just let you off with a warning. I’d grade my argument a B-, worth 40% off.

In Iceland, contesting a speeding ticket is mostly unheard of, and confuses the police. First, you’ll have to go with them to the station. There you’ll need to explain for at least an hour why you’re wanting to submit an appeal. Once you get them to agree,  you’ll need to go back each morning to ask whether your appeal paperwork has been submitted yet. But don’t worry, it hasn’t.

I also learned:

  • Foreigners have the same rights as Icelanders to an appeal process (Article 30 of Act On Foreigners No. 96 /2002).
  • Your actual rights to an appeal process are pretty obtuse to understand (Section 7 of Administrative Procedure Act).
  • The police say you can be detained in the country during your appeal, which I didn’t ever see in writing. This was largely their argument for why I should pay the fee in a prompt manner.
  • Electronic speed limit signs, which show your current speed and flash if you’re over, are 1.5 million ISK (~$13k USD).
  • Ísafjörður has one of the aforementioned signs on the lesser used road into town. I’d be curious as to why it’s there, and not on the main road.
  • Iceland does have a legal process for requesting anonymized data from the government. I’d hypothesize speeding tickets during the summer months are a cash cow.

Unless you’re me, it’s probably easier for you to just pay the ticket via credit card while in the back seat of the police car. I wanted to get my money’s worth in the form of a better understanding of Iceland’s legal system.

And remember, if you don’t exercise your legal rights, you might find you no longer have them.