some fixes to enable analytics