title: Delete Google Analytics Cookies and EU e-privacy law
body: <p>On my site, if user refuses to use cookies (according to the EU e-privacy directive), I block tracking of Google Analytics using the JavaScript ,</p>
  
  <pre><code>window['ga-disable-UA-XXXXXX-X'] = true;
  </code></pre>
  
  <p>With this command tracking is disabled and seems to work (if I surf on the site, Google Analytics doesn't see any activity).</p>
  
  <p>But I notice that <code>__utma</code>, <code>__utmb</code>,.... cookies are still on my browser (in Chrome), so I tried to delete them with <code>setcookie</code> function of php:</p>
  
  <pre><code>foreach ($_COOKIE as $key =&gt; $value) {
  setcookie($key, '', time()-1000,'/','.mydomain.com');
  }
  </code></pre>
  
  <p>But without success! (I inserted this code after the GA monitoring JavaScript) GA cookies are ever on my browser.</p>
  
  <p>So, Can I delete GA cookies?</p>
  
  <p>Or Is enough blocking GA tracking for EU e-Privacy Directive?</p>