shynet
shynet copied to clipboard
Support for GPC header
The GPC header is meant to be a successor in spirit to the DNT header and is legally recognised in California and the E.U. (and other equal implementations of the GDPR), amongst other locations as an opt-out.
It functions the same as the DNT header: 0 means "track away", 1 means "don't your dare." You can check in JavaScript for the existence of navigator.globalPrivacyControl
as another method, but it seems smarter to implement at the server-side to keep the file size of the script still small. If you point me to where I would implement this (searching the repo seems to be somewhat inconclusive), I can add it myself.
We could perhaps implement it just as we do DNT — that is, we could treat GPC the same way we handle DNT. We detect the DNT header at https://github.com/milesmcc/shynet/blob/34d6c920bfe22c56e9fb77ca14411dd2990039bf/shynet/analytics/views/ingress.py#L31 and decide what to do with it at https://github.com/milesmcc/shynet/blob/34d6c920bfe22c56e9fb77ca14411dd2990039bf/shynet/analytics/tasks.py#L64.