Google is scanning its wealth of user-generated data for signs of fashion trends as it works to enhance its sales of online advertisements.