Tweaks to get analytics working