With my limited knowledge I want to answer my own question after took sometimes thinking and learning about it. Please read it until the end and help me broaden the answer.
Tracking cookies is closely related to privacy/spying,
my answer here mostly and specifically for tracking cookies for ads.
In Islam, privacy is an important matter. Spying is infringing other people's privacy. To make it easier, there are 2 kinds of spying in Islam, at war, which is allowed because it's a strategy, and at peace. I will only talk about privacy/spying at peace.
Hadith about spying:
It is also narrated in al-Saheehayn from Abu Hurayrah that the Prophet (peace and blessings of Allaah be upon him) said: ‘Beware of suspicion, for suspicion is the falsest of speech. Do not eavesdrop; do not spy on one another; do not envy one another; do not forsake one another; do not hate one another. Be, O slaves of Allah, brothers.”
-- Al-Bukhaari, 5144; Muslim, 2563.
Narrated Anas: A man peeped into one of the dwelling places of the Prophet. The Prophet got up and aimed a sharp-edged arrow head (or wooden stick) at him to poke him stealthily.
-- Sahih Bukhari 9:83:38
Narrated Abu Huraira: Abul Qasim said, "If any person peeps at you without your permission and you poke him with a stick and injure his eye, you will not be blamed."
-- Sahih Bukhari 9:83:39
Islam schoolar about spying:
Al-Nawawi (may Allaah have mercy on him) said: “Some of the scholars said that tahassus [‘eavesdropping’] means listening to other people’s conversations, and tajassus [‘spying’] means seeking out their faults. Or it was suggested that tajassus means looking for secrets. The word is mostly used in the sense of evil. The jaasoos (spy) is the one who seeks out secrets for evil purposes and the naamoos is the one who seeks out secrets for good purposes. And it was said that tajassus means looking for information for someone else, and tahassus means looking for information for oneself. This was the view of Tha’lab. And it was said that they mean one and the same, which is seeking out information about people’s circumstances.”
From what I gathered, spying is forbidden if it's for bad intention, spying other people secret, and spying in private place. The keyword here is
Here's the story of Umar spying Abu Bakr for good, and it's in public.
Umar (may Allah be pleased with him) used to check the condition of Abu Bakr after the Fajr (Dawn) Salah, and he used to
offer the Fajr Salah then get out of the Masjid to go to one of the
suburbs of Medina everyday. He asked himself: What makes him go to
that suburb everyday?
One day he followed him until he reached a far-away tent, and when Abu
Bakr got out, Umar entered to find an old blind woman with her two
young children. Umar said to her: O servant of Allah, who are you?
She said: I am an old blind woman in this tent I live with my two
daughters whose father died and left us without support.
`Umar said: Who was that old man who came to visit you? She did not
know that he was Abu Bakr. She said: He is an old man whom I do not
know, and used to come everyday to sweep our tent, make breakfast for
us, and milk our goats. Thereupon, Umar (may Allah be pleased with
him) wept and said: You have burdened caliphs after you Abu Bakr.
This is a well known story, the quote above is from http://en.alukah.net/Shariah/0/6446/
Now about tracking cookies, this is a tracking tech that gathering info from people that visiting websites in order to sell ads.
I have few things to say about this:
You go to store browsing shirts left and right, and the store attendant
watching you, then after a while offering you a shirt that you might like based on the shirts you browse around. Is this okay?
You go to a market, bargaining about item that you'd like to buy (item A), you can't find agreement in stall A, you go to stall B, still can't find agreement,
a nearby stall C see this and call you to check his item A. Is this not okay?
Islam instruct its follower not to act without knowledge. You have to have knowledge about what you're going to do. A lot of ayah and hadith about this.
A lot of people using internet without learning its basic. They don't know a lot of things what internet can do. If they learn about internet 101, they sure will know about tracking cookies.
Even if those people didn't read about internet 101 because it's already daily living, at least read some article about internet itself. Islam instruct us to be smart!
You don't need to read about it each time because they typically simiar. They all college data. If you concerned about it, at least read it. Islam instruct people to know about what to do.
People paying for internet might forget that they actually paying for its connection, not its content. Free articles that they read and free websites that they visit have their own owner that actually have their own term and condition if they wish to read or use it.
People complaining about privacy on internet because transition from paper based text to internet (or comparing between the two). Paper can't do a lot of thing, but this is different. Internet isn't just text on the monitor. A lot of things are happening behind that text.
People might forget that browsing internet in real life private place doesn't mean also private in internet.
If they know and still using that websites, can I be blamed? I don't think so.
People crying about privacy on internet I think because:
a. It's not just for tracking cookies for ads, but also spying on matter that actually said private on internet.
b. The fact that a lot of government trying to ban encryption.
c. The fact that a lot of government have backdoor to internet users private data.
d. People know that they being tracked on internet, they have 2 choices: stop using internet but no alternative or the alternative is bad, or keep using internet with them being tracked. This is the situation why they complaining a lot.
FB is social media, it's a public space. And about tracking on their messenger, it's on their T&C
If the company (web owner etc) do something bad with their tracking cookies, and I'm using tracking cookies for ads (as statd on their term), am I wrong too? I think this is different think, a separate think.
TLDR: It's okay to use tracking cookies for ads with how it's used today. May Allah سبحانه وتعالى give me mercy if I'm wrong
Please comment this below or answer the question with a new one. Thanks