Banks and financial institutions have been sitting on vast amounts of customer transaction data for several decades now. The hardware and software technologies to make sense of this vast storehouse of data have been available for at least a decade now. Meanwhile the appetite for insightful data to help marketers target customers online has grown enormously, as has users' disdain for untargeted advertising.

However, banks have been reluctant to mine this valuable gold in their backyards because of what has been variously dubbed as "privacy concerns," "the ick factor" and the "Big Brother problem."

On October 24 and 25, the Wall Street Journal published series of articles detailing the plans of Visa and MasterCard to use customers' credit card transaction data to target online ads to them, complete with excerpts from patents, slideshows and interviews by senior executives.

On October 27, Senator Jay Rockefeller (D-W. Va.) sent out letters to Visa CEO Joseph Saunders and Mastercard CEO Ajay Banga expressing alarm over their companies' actions and asking questions about their privacy policies.

The issue here is visceral and goes beyond privacy. In this age of Facebook, some people value their privacy less than others, but we all feel a shared sense of outrage about some corporation benefiting from our data without giving us anything of value in exchange.

The knee jerk reaction to this incident may be to conclude that bank-based transaction data, as valuable as it may be in improving online advertising relevance, is strictly off limits as this senatorial rap on the knuckles of these greedy corporations proves. Might there be a fair way of doing this that is a win-win for all stakeholders?

The story of Amazon Kindle offers a good example for banks to emulate.

In July 2011, Amazon released its "Kindle with Special Offers," a product where the buyer saw sponsored ads at the bottom of the screen in exchange for a $25 discount on the purchase price of the device. The arrangement was simple, Amazon used the data about our purchases on their website to serve us targeted offers from their affiliates and partners; we got a break on the purchase price. Amazon topped it off with special discounts on its products (including a $10 for $20 offer on Amazon gift cards) that were served up to their "Kindle with Special Offers" customers.

Taking this strategy further, Amazon recently launched its Kindle Fire with a color touch screen, free cloud storage and email capabilities. The Fire comes with the Amazon Silk cloud accelerated browser that allows the user to delegate a big chunk of the browser's computing tasks to its servers, thereby making its page loads faster.

This is where the plot thickens. If you choose cloud acceleration of page loads, Amazon servers know every page you visit on the Fire. You can however do it the old fashioned way by directly going to a web server in which case the Amazon doesn't see your web visits but your pages load slower. Predictably, all this has attracted the attention of the government and Amazon received the customary letter with privacy questions from Congressman Edward Markey (D-Mass.), though it was given a largely clean chit by the Electronic Frontier Foundation because the user could always turn off cloud accelerated browsing if she wanted to.

If Amazon were to come up with a cheaper, ad supported version of the Fire where Amazon always saw its users' web visits, it could have access to users' browsing habits in addition to their purchase habits on Amazon, all with user consent. That would make it a formidable player in the advertising space and possibly give Google some heartburn. Talk about gaining strategic advantage with user data.

So what are the lessons in this story for financial institutions?

First, don't try to enroll everyone at once. Make it opt-in. Some will be okay with the privacy implications right away, some others will come around, and some others will never feel okay with letting their bank data influence their online ads. Accept that there will be a spectrum of choices.

Second, offer your customers some considerable reward in return for letting you monetize their data: a better rewards program, a higher interest rate on their savings, a lower interest rate on their mortgage, a waiver on fees or some combination thereof. Thank them and delight them on an ongoing basis.

Visa and MasterCard may have access to all card transaction data since they sit where they can see it all, but they can't go it alone. Despite having their logos on a large number of cards, Visa and MasterCard are still back end payment processors and don't have much to offer their users in return. This is best done by the banks credit unions or at least in collaboration with them.

Finally, financial institutions should be looking beyond ad revenues to see how such revenues can in turn be a source of lasting competitive advantage by at least partially using those revenues to bring better, cheaper banking products to market and to increase penetration with their existing customer base.

Making sense of noisy transaction data is a big problem to solve — it is heavy math and data mining — but getting the social contract right with customers and gaining their trust is equally important. For the banks that get this right, there is a pot of gold both by way of ad revenues and increased customer loyalty. Taking the higher road may also help banks win some of the credibility they've lost in recent years.

Venkat Rangamani is the chief technology officer of Micronotes Inc., a digital marketing company in Cambridge, Mass. He can be reached at venkat@micronotes.com.