It is not yet known how much the campaign has spent on the ads because Facebook’s public ad database does not immediately report such figures. But Advertising Analytics, an ad tracking firm, said the Trump campaign had spent at least $8,000 on the ads so far.

The advertising campaign is running as tensions between the United States and Iran ramp up. Iran’s supreme leader is vowing retribution against the United States, the Pentagon is at odds with Mr. Trump over threatening Iranian cultural sites, and some Democrats have suggested that the president may have ordered the strike to take attention away from the looming Senate impeachment trial.

The Trump campaign did not immediately respond to requests for comment.

These types of ads, known as acquisition ads, are intended to help campaigns gather more information about internet users with the goal of turning them into online donors.

Most of the Trump campaign’s Suleimani ads work the same way. First, potential voters are shown the ad. Clicking on it brings them to a brief survey on the Trump campaign’s website, which asks questions like, “Do you believe America has the greatest military in the world?” The survey also asks for a name, email address and phone number, which the campaign can then add to its database of potential donors.

Users who submit the survey are also prompted to donate right away, with a message that says, “President Trump is keeping AMERICA SAFE! Now it’s time to step up and stand behind him.” Donation buttons ranging from $42 to $2,800 appear below the text.