CivicActions / nebula

Other
3 stars 5 forks source link

Add Google Analytics and Custom events #48

Closed kevwalsh closed 9 years ago

kevwalsh commented 9 years ago

I created a new property in the same account as Civicactions.com

UA-1170467-6

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-1170467-6', 'auto');
  ga('send', 'pageview');

</script>```

Custom events would be ideal. (button submits, drugs added, etc)
RobertLRead commented 9 years ago

I agree --- "drugs added" would be very valuable. I will put it up immediately when you do that. I have never done it (though I could research.) If you have time to do it, I would prefer that you do that. Thank you.

kevwalsh commented 9 years ago

I've added event tracking for the two buttons ("add-drug" and "improve"). They can be seen in Analytics at Behavior > Events > Overview > Event Label events_overview_-_google_analytics