WASHINGTON — When Gov. Scott Walker kicked off his presidential bid this month, supporters who visited his website could view photographs of him, peruse his announcement speech and read about the Wisconsin Republican’s life and accomplishments.

Using a bit of code embedded on its website, the Walker team was able to track who visited the donation page, tell which potential backers shared interests with existing supporters and determine who was learning about the candidate for the first time. It could then use that information to target prospective voters with highly personalized appeals.

Those supporters who had already given money, for instance, were served an ad seeking another donation. But new supporters received a more modest request: to provide their email address or to click on a link to the campaign’s online store.

While it is no surprise that campaigns are devoting a greater share of their budget and energy on digital initiatives, Facebook, already a major player in past cycles, has been working to expand its digital dominance in the political realm.