Tracking error404 with async javascript

Does anyone know how to track error 404 pages, like discussed here
http://piwik.org/faq/how-to/#faq_60
using the new async javascript tags rather than the old ones displayed in the faq?

Thanks,
Rob