adding analytics workaround for rails 4