I put it into the template ad_footer_end. But, you can also put it at the end of the footer code. But, until they fix the bug with parsing some javascript, you will need to wrap it in <vb:literal> tags. This was talked about in a few threads over on vb.com.
Please see this sticky regarding questions about default vB4 -
Installation Issues / Questions or bug reports regarding default vBulletin 4.0
And please use the code tags for code, not the Quote tags. Thank you.