jessicamarcus
1/25/2017 - 5:18 PM

prevent hits from being sent to Google Analytics during local development

prevent hits from being sent to Google Analytics during local development

// https://developers.google.com/analytics/devguides/collection/analyticsjs/debugging
// add to the analytics <script> block:

if (location.hostname == 'localhost') {
  ga('set', 'sendHitTask', null);
}