I was using a default template, the problem was that it was calling the callback at the end of the body tag rather than in my set of divs. I used a little javascript to fix this:
document.getElementById('footer').innerHTML = document.getElementById('footer').innerHTML.concat([my output]);
Probably not the best way to do it but it works on everything I’ve tested it on.