If you only look at porn with your browser in incognito mode, your browser will not record your porn-viewing history; but the porn sites themselves overwhelmingly embed tracking scripts from Google and Facebook in every page: 93% of 22,484 porn sites analyzed in a New Media & Society paper had some kind of third-party tracker, with Google in the lead, but also including trackers from some of the worst privacy offenders in Silicon Valley, like Oracle.
The data extracted by these trackers (browser config, IP address, unique advertising IDs assigned by your phone vendor) can be used to link your incognito activity to the rest of your browsing.
There are many privacy tools that block some or all of these trackers, though depending on how the porn site is configured, this may break the site's functionality: you could use some or all of Brave Browser and Privacy Badger to keep the tracking scripts at bay. However, your IP address will still be transmitted to porn sites, which may log the address indefinitely and is no better at preventing leaks of this data than anyone else (cough Equifax cough).
To disguise your IP address, you need to use a VPN of some sort. There are many commercial VPNs — though they, too, might be logging your browsing activity — and there's also Tor and Tor Browser Bundle (and Brave also integrates with Tor), though this may be too slow for video-streaming.
Ultimately, tools only get you so far when it comes to privacy, and unless they're backstopped by regulation (for example, if we had a statutory damages regime for privacy breaches that would make storing user data into a high-risk, high-cost, uninsurable business activity), you are stuck in an arms race that you're likely to lose.
What these companies might be doing with pornography-site browsing data is a mystery. Oracle, which owns a number of large data brokersClose X and has been called a "privacy deathstar," could, for example add data collected by trackers with its current profiles. In the cases of Google and Facebook, which refuse to host pornographic sexual content on a number of their platforms, it's not always clear why they are collecting such sensitive information, even if unintentionally.
Facebook and Google denied that potential information collected by their trackers on pornography websites was used for creating marketing profiles intended to advertise to individuals.
"We don't allow Google Ads on websites with adult content and we prohibit personalized advertising and advertising profiles based on a user's sexual interests or related activities online," a Google spokeswoman wrote in a statement. "Additionally, tags for our ad services are never allowed to transmit personally identifiable informationClose X to Google."
Tracking sex: The implications of widespread sexual dataleakage and tracking on porn websites [Elena Maris, Timothy Libert and Jennifer Henrichsen/Arxiv]
Facebook and Google Trackers Are Showing Up on Porn Sites [Charlie Warzel/New York Times]
Google and Facebook might be tracking your porn history, researchers warn [Shelby Brown/Cnet]