How DoNotTrack detection works?

I would like to know how the detection of the Do Not Track status works in the Matomo optout iframe.

It reads the DNT-Request-Header information which is sent by the browser and delivers the correct content accordingly.

1 Like

Have found it.
"$_SERVER[’…’]" I know, but what is this “HTTP_X_DO_NOT_TRACK”?
A search on the internet did not yield a result with an answer.

I am not sure what you mean, but donottrack just makes the browser add a single http header („DNT:1“) to every request it sends.
You can detect it in php with ˋ(isset($_SERVER[‘HTTP_DNT’]) && $_SERVER[‘HTTP_DNT’] == 1);ˋ (HTTP_X_DO_NOT_TRACK is just an ancient variant that is kept for backwards compatibility reasons)

ahhh, ancient. OK, thanks. solved.