Direct marketing services giant Harte-Hanks Inc. has agreed to buy AberdeenGroup Inc., taking off the market one of the leading providers of technology research and lead generation services.