docs(analytics): update analytics documentation; fix code snippets