Properly handle newlines in analytics