We found that public support for the law declined sharply, and roughly equally, if respondents were informed that Mr. Cook, Mr. Oesterle or the mayor of Indianapolis was concerned about it. This provides some evidence that prominent chief executives — even when they aren’t major employers in the state — can shape public opinion about controversial social issues. Mr. Oesterle, after all, could credibly commit to moving jobs out of Indiana, and the mayor of Indianapolis can claim to understand the needs and values of people in Indiana. But Mr. Cook apparently also commands a sizable audience that can be swayed by his opinion.

Perhaps more interesting, we asked another 2,176 respondents how likely they were to buy Apple products. We prefaced this question for some respondents with information about Mr. Cook’s discrimination concerns, for others with a description of Mr. Cook’s business philosophy and for the remainder without any preamble. Respondents who were prompted by Mr. Cook’s opposition to the Indiana law — particularly those who supported same-sex marriage — expressed a greater intent to purchase Apple products than did the other two groups. While it might not be the motivation of C.E.O. activists, consumers appear to respond favorably to the companies’ products when they agree with the chief executive’s politics.

These consumer gains outweighed, in our study, the consumer losses incurred by those who opposed same-sex marriage and were put off by Mr. Cook’s advocacy. This finding brings to mind Dan T. Cathy, the chief executive of Chick-fil-A, who in 2012 angered many progressives with public comments opposing same-sex marriage — but who also received plaudits, and perhaps increased business, from those who agreed with him.

Our findings are preliminary. But if they turn out to hold more broadly, they may signal a major shift in corporate public relations. Until recently, most large companies aimed to be neutral on controversial social issues, not wanting to alienate a large segment of potential customers. As the basketball star and Nike pitchman Michael Jordan memorably said when he declined to endorse a Democratic candidate, “Republicans buy sneakers, too.”

But in an era of political polarization, in which we are increasingly cloistered in neighborhoods, social networks and workplaces that serve as echo chambers for our ideological beliefs, corporate neutrality may be outdated. As brands seek to “personalize” their relationships with consumers, is adopting a political orientation part of closing the deal? Perhaps it is better in 2016 to be intensely loved by a few than inoffensive to many.