CivicActions / nebula

Other
3 stars 5 forks source link

Push each drug to Google Analytics as it is added to the tool #92

Open kevwalsh opened 9 years ago

kevwalsh commented 9 years ago

We configured Google Analytics to use Site Search to record the most popular saved searches. For example http://sideeffect.local/?saved=FINASTERIDE+FUROSEMIDE is recorded as a search for "Finasteride furosemide".

This only records people who access that comparison via a shared URL.

In order to capture each drug individually as a search event, we want to push http://sideeffect.local/?saved=FINASTERIDE and http://sideeffect.local/?saved=FUROSEMIDE as each of those drugs gets added to the tool.

kevwalsh commented 9 years ago

best way to do this is as ga('send', 'pageview', '{/?saved=DRUGNAME}');