Yahoo! Inc. (Nasdaq: YHOO)'s earnings increased in the second quarter as the tech giant's advertising revenue rose slightly.

The Sunnyvale, Calif.-based company had earnings per share of 27 cents, beating analysts' estimates of 23 cents per share. It had revenue of $1.08 billion, excluding acquisition costs, missing an average analyst forecast of 1.1 billion. Display advertising revenue rose 1 percent to $473 million and search revenue rose 4 percent to $385 million, excluding traffic acquisition costs.

The company's biggest recent move was naming Marissa Mayer, a former Google (NYSE: GOOG) executive, as its new president and CEO on Monday. Mayer will be tasked with giving the company a sense of direction as its advertising business continues to be challenged by her former employer. Yahoo! also partnered with other media companies.

We also moved aggressively with new strategic agreements with Alibaba and Facebook and announced several new partnerships including CNBC, Clear Channel and Spotify, said Tim Morse, CFO of Yahoo!, in a statement.

Yahoo! shares rose by 15 cents, or 0.96 percent to $15.75 in after hours trading.