Adds analytics for view toggle (#4448)
Adds analytics for view toggle (#4448)

* add analytics for view toggle

* use React recommended ref style

* bind this context on analytics function

department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website