It’s no surprise that so many successful brands have done well by the principles of social and other forms of digital marketing. But can you do social well while also doing social good? I think you can.

It turns out that the knowledge and insight that we glean about our audiences can be used for incredibly powerful social purposes. Take, for example, Société de transport de Montréal (STM), the fourth largest public transportation system in North America. Working with SAP, STM has partnered with local merchants to deliver digital offers and incentives to help throttle demand during peak periods by getting commuters off the public transit system and into community retail, dining and entertainment venues. Later, when peak demand subsides, commuters are drawn off the roads and onto public transit. By delivering context-aware offers, STM can shape the demand curve while also helping to support local businesses—doing well while doing good.

The key is to use incentives to drive, not only customer conversions, but desirable social behaviors. This idea of social engineering may sound slightly Orwellian, but it has strong precedents in the design of incentive systems, which are based on the premise that man is pretty much coin operated. At the heart of this idea is Rational Choice Theory, which is a microeconomic concept from the Chicago school that suggests people will always weigh costs and benefits to maximize their own personal gain. If we can align these incentives with desirable social outcomes, we all win.

Of course this begs the question about what is desirable and who dictates desirability, which is a thorny set of questions that I’ll leave to the ethicists. Come to think of it, maybe these questions are best answered by the wisdom of crowds.

A recent Harvard Business Review article describes how incentive systems and social engineering have helped to restore commercial fisheries around at-risk and collapsed ecosystems. Here, incentive systems designed around quotas help drive behaviors for good that allow fisherman and fish to all do well.

But incentives aren’t only about economics. Last May, Facebook announced a new feature that allows users to advertise organ donor status to their social network. The idea is to inject some social good into the social graph, matching the willing and the needy to help save lives. Here, the incentive is more purely social than economic: Participation is driven by any combination of social factors—conformance, ego and altruism all come to mind.

Has it worked? According to a report by The Hastings Center Bioethics Forum, initially, the program yielded a massive spike in donor registrations—the greatest spike in history—followed by a decline back to previous rates of donation. Does this mean that people respond best to economic incentives? Perhaps (in fact, probably). But it also reminds us of the fact that the best digital marketing programs aren’t one and done; they create ongoing, immersive experiences that drive sustained behavior over time. These principles apply equally to both profit- and good-seeking programs.

It’s also worth mentioning that a true commitment to social good requires that you walk and talk the mission, which means that it must pervade your brand promise in every aspect of value creation and delivery. Social good is as social does. Anything less will make your good deeds feel hollow.

It may be more common to envision how digital marketing can drive commercial behaviors to the benefit of a brand, but don’t discount the power of these techniques to do some social good.

It turns out that digital marketing isn’t only about funneling dollars from your pockets. It has the potential to do, as Andrew Carnegie called it, “real and permanent good.”