How can I add text to all posts/pages/categories/homepage etc

Thanks to some outside help the answer was simplistic, I just need to hook into this

add_action( 'wp_footer', 'AddTrackingScript' );

and then simply echo it out and it then gets spat out at the end of the page.

function AddTrackingScript() {
   echo '<script type="text/javascript">....</script>';
}