In reply to Nick Haskins.

That type of code sounds just like Google Analytics code and how it needs to be within the footer of a theme in order to register stats. It's not good to have it tied to a theme as I myself found out when I switched themes. Now I have a 2 week gap in my stats data. If it needs to be in the footer or the header, a plugin should do that so switching themes doesn't alter the functionality of that code.