Seth Godin posted last week about how time has a long tail now. The gist of the post is that if you put a url in a marketing campaign, then that url is more or less locked in stone and its existence needs to last longer than the life of the campaign. Well, I suppose you could consider dishing out 404s to customers as being a good idea, but I don’t.
This post worked its way back into my brain while waiting (too long) for the subway just now. If I was in charge of the web testing and / or monitoring of the Reebok website, what could I do to prevent 404s from being part of the Reebok experience?
I think first I would get marketing and operations in the same room and attempt to get agreement that this content is to remain on the server. Once I had that I would add checking for the presence of that url in with each build / site push — in python of course.
import httplib class MarketingLongTail(object): def __init__(self): self.h = httplib.HTTPConnection("www.reebok.com") self.h.connect() def check_code(self, response): if response.status != httplib.OK: if response.status == httplib.NOT_FOUND: return "NOT FOUND!" # if you cared about redirects you would handle 301 and 307 here else: return "okay" def Terry_Tate(self): self.h.request("GET", "/terrytate") print "Terry Tate campaign is: %s" % self.check_code(self.h.getresponse()) # implement other campaigns in much the same way as the terry tate one def __del__(self): self.h.close() if __name__ == '__main__': mlt = MarketingLongTail() mlt.Terry_Tate() # and of course you call your campaign here
This script could easily be modified to work with urls for any organization. And new urls / campaigns can easily be added.
It could also be pretty easily modified to handle the situation where the urls are discontinued and people are redirected to the main site or perhaps a page saying ‘This campaign has ended. Here is a list of our current ones’ by a couple more lines of logic in the check_code method.