Taylor Swift's recent Instagram post endorsing two Tennessee Democrats was a very off-brand move for the singer-songwriter. Swift has always kept her political views private, but by breaking her silence and urging people to vote, the 28-year-old pop star demonstrated that taking sides politically can trigger a positive public response.

Almost 65,000 people nationally registered to vote on Vote.org in the 24 hours after Swift took to Instagram, compared with 190,178 new registrations during the entire month of September,  BuzzFeed reports. Contrary to the idea that taking political sides will alienate half of your fans, Swift's Instagram follower count has held steady at 112 million.

But should you follow Swift's lead by taking a political stance publicly? Research shows that consumers today don't mind brands weighing in on political issues. In fact, two-thirds of respondents in a 2017 study from analytics firm Sprout Social said they want companies to take a stand on political issues.

Still, there's a right way and a wrong way for brands to make a political statement, says Dean  Crutchfield, the founder and CEO of marketing agency Crutchfield + Partners. Companies that throw their support behind political issues should do so in a way that aligns with their brand, Crutchfield says. He points to Nike's recent ad campaign featuring former NFL quarterback Colin Kaepernick, who became a controversial figure in 2016 for kneeling during the National Anthem to protest police brutality. Celebrating athletes is one of Nike's core values, so when the company hired Kaepernick, the message felt authentic, according to Crutchfield.  

"It showed many larger brands that you can take a stand," he says. "I think there will be more [political statements] because of what Nike did with Colin Kaepernick." Nike'sshares hit a record high of $83.90 the week of the Kaepernick ad, and, soon after, the company added about 170,000 Instagram followers, Wedbush Securities analyst Christopher Svezia told CNBC.

In the case of Swift, the pop star wrote on Instagram that she could not support Republican candidate Marsha Blackburn because she voted against equal pay for women, voted against the reauthorization of the Violence Against Women Act, and "believes businesses have a right to refuse service to gay couples."

One brand whose attempt at a political statement backfired is Pepsi, according to Adam J. Broitman, a marketing consultant and former VP of marketing at MasterCard senior adviser. A 2017 advertisement borrowed imagery from the Black Lives Matter movement, but the TV commercial featured the white model Kendall Jenner handing a can of Pepsi to a white police officer, and drew criticism for minimizing the danger protestors felt at the time.

"It didn't seem that they had the right to create that in the first place," Broitman says. "If it were part of a larger initiative on behalf of the company, in which they actually function as an agent of change, then that probably wouldn't have been that bad." Thousands of people shared their disgust for the ad on social media, leading Pepsi to apologize and remove the commercial shortly after it went live.

While making political statements can galvanize consumers and be a smart move from a branding perspective, Crutchfield says companies should avoid getting involved in too many political issues, as it can water down political messages. He adds that picking the right issues to get behind should come naturally.

"It's not hard to get involved if you stand for something," he says.