Open jonathanarde opened 8 years ago
Check in the template proces.env.NODE_ENV === 'production' If it is, then inject in the template the analytics script. Otherwise do not.
Here is the guide for tracking events with analytics: https://developers.google.com/analytics/devguides/collection/analyticsjs/events
include google analytics only in production