It's a thing that happens every day: Investors make money off data that you're giving them for free.

Think of something simple, like going to a store for some new clothes. That simple retail transaction generates a legion of data, like where you're shopping, your demographics and exactly what choices you make in the store. That data is anonymized and aggregated with other shoppers' data before being sold.

The end user? It's often hedge funds.

CNBC wanted to untangle the alternative data supply chain, and see exactly who's profiting off of your data, and how. So we went shopping for a new pair of pants.

You're on your way to purchase a new pair of pants. You drive to the store and park in the massive parking lot outside. Satellites from the commercial space industry see you pull up. They sell pictures of that parking lot — and thousands of others like it — to a firm called Orbital Insight.

The firm analyzes those satellite photos and turns it into data showing where and when people are shopping. They say consumer traffic can give them an early sense of same-store sales and revenue ahead of quarterly earnings.

But it doesn't end there. There are hundreds of apps — including weather and traffic apps you use everyday — that are collecting geolocation data wherever you go. They sell that data to companies like Thasos, a firm that specializes in analyzing foot traffic data. Those insights show how many customers visited a store on any given day – the kind of information investors pay top dollar for.

When you bought those pants, companies were tracking that too. If you use a program that combines all of your financial accounts in one place, you may have agreed to let companies like Yodlee sell your credit card transaction history to hedge funds.

The data is anonymized, of course.

Your emailed receipt for the pants is also full of valuable insights. That data is pulled through services like Rakuten Intelligence's Unroll.me. The software markets itself as a way to rid your inbox of junk mail. But in doing so, it gets a look at your emails and can gather useful insights into your shopping habits to sell to investors. Unroll.me says its technology can automatically recognize commercial emails and doesn't look at or share private ones.

And if you brag about your new pants on social media, you can count on a whole host of companies scraping Instagram, Facebook and Twitter to gather sentiment about the top retail brands.

There are more than 400 firms collecting so-called alternative data and selling it to hedge funds. Some data sets are more helpful than others. But overall, the use of alternative data is becoming more popular as fund managers look for ways to get an edge.

Funds are expected to spend more than $1 billion on alternative data this year, and almost double that in 2020, according to AlternativeData.org, an industry site run by YipitData.﻿