Fix analytics

Tidyup, and fixed up analytics so it doesn't render for drafts or the draft index. Also fixed bug in the draft url generation.