According to official Spanish government statistics released this week, prostitution and narcotics account for nearly $12 billion of the country's total GDP. The figure means these illicit trades accounted for almost 1 percent of the total Spanish economy.

The published statistics are part of a larger European initiative to incorporate estimates for "shadow economies" — revenues generated by everything from human trafficking to the sale of contraband cigarettes — when reporting national data. It's technically required by European law, but since the means by which one comes up with these figures is gauzy, to say the least, many countries have not complied, reports the Economist.

To figure out the data for how drug sales may have affected the country's economy, Spain's national statistics agency extrapolated from the quantity of drugs seized by authorities. To determine the total value of sex work, it counted the number of known prostitutes working in the country and, in consultation with sex clubs, calculated how much they earned. Prostitution is decriminalized in Spain, but certain activities around the trade, such as pimping, are considered illegal.

In other European countries, similar projections are also being plotted. Beginning next month, Italy will start including GDP estimates for prostitution and illegal drugs. According to Eurostat, those figures could mean Italian GDP is as much as 2.4 percent higher than previously calculated. In Germany, Europe's biggest economy, estimates suggest that prostitution and illegal drugs pulled in as much as $91 billion in 2013 — 3 percent of the value of the total economy.

According to the New York Times, the British government reported that "illegal activities would have added about $17 billion, or 0.7 percent, to its GDP in 2009, according to the Office of National Statistics." The methodology used by these European governments to gauge the depths of their shadow economy all vary widely.

But the imperative to better track the real figures of these economies is not just a fixation on illicit activities. Here's the Economist:

Insee, France’s statistical body, estimates that the [EU’s updated economic measurement standards] will lead to an increase in French GDP of 3.2% — equivalent to a couple of years’ growth at current rates. But little of that is due to an uptick in debauchery: the accounting rule update also reclassifies research and development as an investment rather than a cost, among other things which will attract rather less public attention.

Such expanded analyses of a country's GDP, say international organizations like the United Nations, allows policy-makers to have a more accurate sense of what makes an economy tick and how incomes flow in and out of certain communities. There's an additional incentive in Europe, reports the Wall Street Journal: "Some European countries have extra incentives to inflate the size of their economies. In addition to bragging rights, a higher GDP helps keep a nation's debt and deficits within the EU's prescribed targets."

— Rick Noack contributed to this post.