Is there any reason why `analytics` would be undefined?