ETFs tracking U.S. mid-cap stocks and European markets were the hottest funds in August based on buying patterns.

For example, iShares Core S&P Mid-Cap (NYSEArca: IJH) was the best-selling ETF last month with inflows of $2.2 billion, according to IndexUniverse data. A leveraged fund, ProShares Ultra MidCap 400 (NYSEArca: MVV), reeled in over $1.3 billion.

ETF investors also seem to be betting on a recovery in Europe, which is trying to put its debt woes behind it. Vanguard FTSE Europe (NYSEArca: VGK) attracted $1.6 billion last month while iShares MSCI EMU (NYSEArca: EZU) hauled in $974 million. EZU tracks countries in the European Monetary Union.

Pan-European equity ETFs hit an all-time high of $4.7 billion in inflows in August, driven by the improving macroeconomy for the Continent and individual countries, said Todd Rosenbluth, director of ETF research at S&P Capital IQ.

Meanwhile, mid-cap ETFs brought in over $3 billion globally.