The researchers used a technique called "mass defect filtering," which can detect related compounds all at once. That's because related compounds have almost equal numbers to the right of the decimal point in their molecular masses.
The researchers tested their technique on 32 herbal products with names like "Mr. Nice Guy" and "Hot Hawaiian." They found that every product contained one or more synthetic cannabinoid; all told, they identified nine different compounds in them — two illegal ones and seven that are not regulated.
The news story appears in Chemical & Engineering News and the original paper is (behind a paywall) in Analytical Chemistry.