By most accounts, Google (NASDAQ:GOOG) (NASDAQ:GOOGL) had a solid second quarter, announcing impressive gains in revenue, earnings, and operating cash flow. Google's business continues to thrive, and it will seemingly be quite some time before a relative digital advertising upstart like Facebook (NASDAQ:FB) poses a serious threat to the online search king.

But like all great businesses, taking the leadership position in an industry and maintaining that No. 1 ranking are two different things. This is why Google, even with its string of remarkable financial results intact, is exploring ways to improve one of its few downsides: declining average costs per click. In other words, how much a Google advertiser pays each time a prospective customer clicks on an ad.

The dilemma
The good news is that Google is continuing to grow its top line. Driving much of Google's growth has been the uptick in mobile users, which in turn helped to boost the number of paid clicks last quarter by an impressive 25%. Android may be free to smartphone manufacturers, but it's paying off for Google. And as marketing departments continue shifting ad spend to online properties like Google and Facebook, future growth would seem to be assured.

However, with nearly 60% of Google's revenues coming from overseas, pricing pressure from its international advertising clients could prove worrisome. The sheer volume of paid clicks last quarter made up for the drop in average fees, but that hasn't stopped Google from trying to remedy what has become a disturbing trend.

In fact , other than a positive blip in Q1 of 2014, Google has experienced a steady, quarterly decline in cost-per-click rates going back years. The answer? Take a page from Facebook and use data to improve results for advertisers, and provide the analytical tools to prove it, and marketing departments will gladly write Google bigger checks. Google certainly knows that, which may explain its ongoing hiring frenzy and increased spending on infrastructure.

Better data equals higher ad fees
Google's primary digital advertising competitor, Facebook, continues to post impressive business results. With nearly $3 billion in revenue last quarter, Facebook is clearly doing a lot of things right. Like Google, the vast majority of Facebook's earnings are derived from ads, much of it mobile advertising.

One particularly impressive aspect of Facebook's growth is that the company doesn't simply sell more ads to generate higher revenue. It uses a seemingly unending amount of user data to better target advertisements, which enables it to charge more. When all is said and done, advertisers pay for results, and using data correctly gets those results.

One way Google hopes to put an end to its declining cost-per-click fees is to provide advertisers with tools to better monitor their ads, and ultimately get a better return on investment. As with Facebook, Google believes that better results for its marketing customers will translate to higher ad fees.

Google's clients can already monitor their ads, using AdWords and their merchant account to check the number of clicks and other performance metrics. But the existing tools are somewhat limited. For example, advertisers today are only able to review results at a fairly high level, such as by category. That's not bad, but Google is taking steps to give its clients a better, more comprehensive suite of analytic services.

By the end of this month, product listing advertisers -- ads that include a product image and brief description and comprise half of all Google's paid search clicks -- will be required to manage their marketing campaigns via Google's Shopping feature. Doing so will give marketers the ability to dig much deeper into their campaign results, including by individual product and across multiple channels. The transition to Shopping, Google hopes, will give clients the chance to see what's working, and what's not, and to adjust their campaigns accordingly.

Final Foolish thoughts
As Facebook has demonstrated, marketing departments will pay for results, and one way to ensure a successful ad campaign is to use data, something Google has by the truckload. Now, with the implementation of Shopping as a tool for clients to monitor the performance of their ads, Google hopes to show advertisers that paying more can be a winning strategy.

Tim Brugger has no position in any stocks mentioned. The Motley Fool recommends Facebook, Google (A shares), and Google (C shares). The Motley Fool owns shares of Facebook, Google (A shares), and Google (C shares). Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.