And yes, the difference between this and ads is paper-thin – just like the difference between search and ads is paper-thin – so it's easy to get things wrong.
One of these experiments was through a German start-up called Cliqz, in which Mozilla invested in early stage. For a small fraction of German users, Firefox used the Cliqz engine as an implementation of this recommendation engine: https://support.mozilla.org/en-US/kb/cliqz-recommendations-f...
For these users, lots of private data was sent to Cliqz (pretty much the data that Chrome sends to Google). Cliqz is open-source and there were contracts between Cliqz and Mozilla to legally guarantee user's privacy, but I do not know/remember the details. Also, I seem to remember that the default Cliqz settings in the experiment were set to minimal privacy, which wasn't very good.
The experiment didn't last long, in part because of privacy concerns, but some people were (understandably) unhappy about this, including most Firefox devs.
(I may be missing some details, I haven't followed this closely)
More details here: https://www.reddit.com/r/firefox/comments/74yo19/cliqz_and_m...