I wrote a plugin which uses wp_enqueue_script() which will include the snippet in either the header or footer depending on the parameters you pass it. The in_footer parameter works great - if the theme utilizes the wp_footer() hook.

What are my options if I want to include the JS snippet directly before the </body>tag if a theme is not using wp_footer() hook?

I'm guessing you're thinking of this as a fallback for themes that aren't using wp_footer()? You could append it to the body from within wp_head(), but this is going to be ugly. There aren't really a whole lot of solutions available to you though.
–
supajbMay 18 '11 at 7:10

Be sure to add a notice in your FAQ that you require wp_footer() in the theme. You can also add a check in your plugin admin page: checking for the existence of wp_footer() can be as simple as loading a page with a special $_GET variable in the background, which will trigger a hook that outputs some control code in wp_footer, and reading the result to see whether this control code can be found.