A man types on a computer keyboard. (Kacper Pempel/Reuters)

Jane Harman, a former Democratic member of the House of Representatives, is president and chief executive of the Woodrow Wilson International Center for Scholars.

Two weeks ago in Boston, authorities stopped a disturbed young man before he could launch a terror attack; tragically, last week in Chattanooga, the story ended very differently. Law enforcement officials are scrambling to learn whether clues were missed that could have prevented the rampage and led to the alleged shooter, Mohammod Youssuf Abdulazeez. But in too many cases, the breadcrumb trail starts with suspicious ones and zeros — with digital propaganda that we still struggle to counter.

In 2007, when Twitter was a year young and WhatsApp was still two years away, I introduced a bill that would have set up a national commission to study the new ways that terror groups were reaching the lost, disaffected and psychopathic. The Violent Radicalization and Homegrown Terrorism Prevention Act of 2007 passed the House of Representatives by a vote of 404 to 6, before it was misconstrued by outside groups and mothballed by the Senate.

The unprecedented savvy of the Islamic State — the shocking reach of its “digital caliphate” — makes this work more urgent than ever. Online, we move too slowly and know too little to combat this generation of Web-native jihadists. We’ve failed to mobilize tech and messaging talent to counter the Islamic State on social media. This country built Silicon Valley; we shouldn’t need computer lessons from 7th-century thugs. It’s past time to bring our counternarrative up to date.

In part, this is a capacity problem. Organizations fighting the message battle, such as the State Department’s Center for Strategic Counterterrorism Communications, are dramatically underresourced. The “Think Again Turn Away” campaign, which rebuts jihadist accounts, has fired off almost 6,000 tweets — but Ali Shukri Amin, a 17-year-old Virginian who pleaded guilty last month to spreading Islamic State propaganda, has launched more than 7,000 by himself. A recent study from the Brookings Institution found that tens of thousands of Islamic State boosters such as Amin are active on Twitter, amplified by bots that help get propaganda trending. Before we even ask if we have the message right, it should be obvious those numbers don’t work. We’re trying to do by hand what the Islamic State crowd-sources.

We simply must do better. Political campaigns have been transformed by the power to micro-target voters; that skill set needs to be brought to bear for countermessaging. Such efforts could allow us to reach someone such as “Jihad Jane,” whose MySpace posts included statements such as “I support all the Mujahideen.” She didn’t fit the typical terror profile, and the good news is we found her before she could act. Imagine if searching for beheading videos brought up ads for mainstream spiritual resources in the searcher’s community; imagine if jihadist Twitter bubbles were punctured by targeted messages from responsible religious authorities. The same approach drives a multibillion-dollar digital ad economy, dominated by firms that know you — statistically — better than your mother does. Google, Facebook and Twitter work with clients in every space, including both political parties, to shape maximally persuasive campaigns that reach people where they are. By partnering with tech firms, there’s no reason we can’t narrowcast more effectively than our enemies.

We can do it without compromising privacy or civil liberties more than a pop-up ad does. And we can do it for far less than it costs to hire federal workers to tweet all day.

So far, the failure to leverage Big Data for countermessaging has been a strategic failure of the anti-Islamic State campaign. But who should do the leveraging? We need to be very aware that our soft power is limited in these spaces. @ThinkAgain_DOS does too much of what younger Internet users would call “sea-lioning”: jumping with a splash into conversations where it doesn’t belong. The kind of kids swayed by Dabiq, the Islamic State’s glossy magazine, are not the kind of kids open to the input of the State Department. Recruitment is happening on platforms where the U.S. government has less than zero cultural capital.

Smart, subtle partnership will be the key. Already, efforts such as the Network Against Violent Extremism, a Google Ideas effort, are connecting the voices that can speak credibly on these issues: ex-jihadists, former radicals, survivors of extremist violence. When top-down government approaches are flawed, then bottom-up, grassroots organizing is an obvious next try. The government still has skin in the game — dollars and cents, and, more important, convening power and information-sharing — that can make these public-private partnerships work. But it needs to lead from behind. Get religious leaders, political consultants and tech firms in the same room, then step back. This is a community effort and an American effort — the feds aren’t the right face for it.

We used to be good at this kind of partnership, offering the better messengers a helping hand. During the Cold War, the United States quietly supported important cultural institutions, literary journals — even the Russian-language publication of “Dr. Zhivago.”

Today our war for hearts and minds is fought online, not in print; the key expertise isn’t centered in Washington. As the techies say, there has to be an app for that.