Created
November 10, 2016 11:07
-
-
Save tarranjones/2d2dc8c54e922393639d04eff3a06304 to your computer and use it in GitHub Desktop.
response header for DNT (tracking-status-values)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @info https://www.w3.org/TR/tracking-dnt/#tracking-status-value | |
*/ | |
function getRequestTrackingStatusValue(){ | |
return "N"; | |
/* | |
TSV = %x21 ; "!" — under construction | |
/ %x3F ; "?" — dynamic | |
/ %x47 ; "G" — gateway to multiple parties | |
/ %x4E ; "N" — not tracking | |
/ %x54 ; "T" — tracking | |
/ %x43 ; "C" — tracking with consent | |
/ %x50 ; "P" — tracking only if consented | |
/ %x44 ; "D" — disregarding DNT | |
/ %x55 ; "U" — updated | |
*/ | |
} | |
if(isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] == 1){ | |
header("Tk: " . getRequestTrackingStatusValue()); | |
} else { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment