W3C home > Mailing lists > Public > public-tracking@w3.org > November 2012

Re: navigator.doNotTrack

From: Walk and Ramble <ramble@walkandramble.co.uk>
Date: Wed, 21 Nov 2012 11:18:05 +0000
To: public-tracking@w3.org
Message-ID: <E1Tb8KT-00021r-OP@lisa.w3.org>
Hi

If anyone not familiar with Javascript needs a simple script which 
runs analytics script only when doNotTrack is not set, the script 
below can used.

Daniel


<script type="text/javascript">

if (window.navigator.doNotTrack == "yes")
   {
   }
else
   {
    put analytics script here, but do not include html <script> tags
   }

</script>
Received on Wednesday, 21 November 2012 14:56:16 UTC

This archive was generated by hypermail 2.3.1 : Friday, 21 June 2013 10:11:38 UTC