Support replacing multiple instances of the same template variable in analytics templates
* updating a switch into object literal and fixed a couple linter errors * added a comment about weird formatting * style: use lodash get * fix: pass eslint + puglint + jest