When Jennifer Garner appears on screen pitching a Capital One credit card and asking "What's in your wallet?" the answer is increasingly coming from viewers looking at laptops or smartphones and not televisions.

Financial services companies have nearly doubled their spending on digital advertising in the past five years, growing 82% to $7.3 billion from 2011 to 2015, according to data from eMarketer, a market research firm in New York.

Banks, insurance companies and retirement planners are following a broader trend — eMarketer estimates that this year the business world's spending on digital ads ($72.09 billion) will surpass TV ad spending ($71.29 billion, excluding billboard and print) for the first time. Digital ads include everything from banner ads to online videos to search-engine ad placements.

"Digital [advertising] allows for the reach of television but additionally offers depth in message and trackable engagement," said Katrina Wells, senior vice president of corporate marketing at the $19 billion-asset First National Bank of Omaha in Nebraska.

Online ads allow bank managers to present their superiors with a clear line from the amount spent on ads to a specific number of new customers.

"You get a direct return on investment," said Gabe Gottlieb, chief executive of Pathmatics, an advertising data firm in Santa Monica, Calif. "You can go to your board and say, 'This makes a direct impact for us.'"

The $339 billion-asset Capital One Financial uses digital advertising more than any bank, as it spent about $43 million on digital ads in the second quarter, the most of any financial services company, according to Pathmatics.

Its Capital One 360 online banking unit runs banner ads touting money market accounts. Over on YouTube, Garner and fellow actor Samuel L. Jackson pitch Capital One Bank's credit cards. Some of Capital One's video ads also appear on broadcast television, too. Jackson promotes the Quicksilver cash-rewards card, and Garner explains the features of Capital One's Venture airline-rewards card. Capital One has also used online video to promote its new voice-activated account-management service on Amazon's Alexa device.

Capital One did not respond to calls and emails seeking comment.

What distinguishes online ads from their counterparts on TV screens or billboards is the ability to track who is clicking the links.

Financial institutions collect reams of data on customers who open new accounts online, said Miranda Opiela, manager of distribution and channel marketing at the $20 billion-asset Pentagon Federal Credit Union in Alexandria, Va.

PenFed builds a profile of likely customers and uses those characteristics to help it pinpoint other potential targets who fit the mold, she said.

"We build a model, and then we try to find more people like that, and we serve ads for these people," Opiela said.

PenFed and other institutions then create personalized ads and purchase advertising on the best sites, such as Yahoo or eBay.

Although digital ads may now reach fewer total eyeballs than broadcast, they pack a bigger punch when it comes to signing up new customers, said Zubair Rana, the credit union's chief marketing officer.

"We have the ability to identify exactly who we want" with digital ads, Rana said.

Mobile and video ads are growing rapidly, but online advertising specifically tailored for use on a desktop or laptop computer remains popular. One reason is that when consumers pursue complicated tasks, such as researching a mortgage, that is typically conducted from a desk rather than a cellphone. The application process itself usually takes place in person, but the first lure is made online, said Nick Clements, founder of the consumer-referral site MagnifyMoney.com.

"People will shop for a mortgage rate online, so digital ads are a great way to generate interest" in your bank for mortgages, Clements said.

Credit card issuers have been the biggest spenders on digital ads. Capital One's $43 million digital-ad spending represented about 10% of its total marketing budget. Discover Financial Services spent $11 million, about 6% of its marketing budget, according to Pathmatics. American Express spent $8 million, or about 1% of its marketing budget. The rest of the 10 biggest spenders were insurance firms, including Progressive and State Farm, or tax preparers and investment advisers.

Spokesmen for American Express and Discover declined to discuss their companies' ad spending.

Smaller financial institutions use the same methods as Capital One to reach prospective customers, just on a smaller scale, said Keith Brannan, chief marketing officer at Kasasa in Austin, Texas, which develops checking and savings account products. Community banks make good use of Facebook, which allows them to create localized ad campaigns "so they're not wasting bullets on advertising to the wrong people."

Finally, digital ads are becoming more popular as they are seen as a way to reach the ever-elusive demographic group of millennials, Gottlieb said.

"If you are going after millennials, those eyeballs are online, and if you want to reach them, you've got to advertise digitally," he said.