OK

Delayed tracking pixels

I ran in to a situation at work today where an advertiser, wanting to place a tracking pixel on a sponsored piece of Web content, only wanting to know about visitors who have been on the page containing the content for at least one minute. The advertising system we use doesn’t offer a solution for this out of the box and I didn’t think it would be terribly difficult to make happen, but was surprised to not find any quick how-to guides anywhere.

The code snippet below outputs markup to a visitors browser 60 seconds after the page they are viewing loads. It was tested in Doubleclick’s Dart for Publishers as a piece of custom creative targeted to a ad zone used exclusively by the piece of sponsored content:

<script languagage="Javascript">
/* %u - keep Dart from complaining about no url */
setTimeout("firePixels()", 60000); //60 second delay
function firePixels(){
	var tStage = document.getElementById('trackerstage');
	if (tStage){
		tStage.innerHTML = "<img src=\"http://www.100781.org/happles.jpg\">";
	}
}
</script>
<div id="trackerstage"></div>

This solution worked perfectly, after replacing my test image with the advertiser’s tracking pixel, of course. This is also simple enough that it should be able to work just as well when delivered by any advertising system. Have a similar solution or tip? Share!

For Your Reading Pleasure...

post a comment
The follwing HTML tags are allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Search

Post Details and Sharing

February 2010
SMTWTFS
« Jan Mar »
 123456
78910111213
14151617181920
21222324252627
28 

Twitter @senorfox

@solothedrunk BRILLIANT!
tweeted 9 days ago.
RT @AtTheDriveIn_: ¡ ATTENTION ! To whom it may concern: AT THE DRIVE-IN will be breaking their 11 year silence THIS STATION IS …NOW…OPE ...
tweeted 27 days ago.
Can one ever have enough @KrunchPizza? NO. http://t.co/AlVgLB8q
tweeted 45 days ago.
My Bawls are showing. http://t.co/cQjHSRIh
tweeted 58 days ago.
@KrunchPizza Best BBQ chicken pizza. Ever. http://t.co/nkAbCmPH
tweeted 101 days ago.

Last.fm Playlist

Public Menace, Freak, Human Fly
Powerman 5000
scrobbed 7 days ago.
White's Ferry
Clutch
scrobbed 8 days ago.
The Devil & Me
Clutch
scrobbed 8 days ago.
Power Player
Clutch
scrobbed 8 days ago.
You Can't Stop Progress
Clutch
scrobbed 8 days ago.