If touching Social Security is the third rail of politics (a metaphor for subjects so controversial that merely referencing them can mean the instant death of one’s political career), then touching politics is the third rail of marketing. Including politics in one’s marketing often means alienating 50 percent or more of one’s potential customer base, and not just temporarily but perhaps permanently.

Marketing expert Derek Halpern of SocialTriggers says “Marketing + politics = disaster.” A study from J. Walter Thompson Intelligence found that politics can be such a turn off that political ads have a negative effect on the performance of ads that follow them, even if those subsequent ads have nothing to do with politics. Participants in the study who viewed a non-political, brand ad after a political ad found the brand ad to be 27 percent less appealing, 29 percent less entertaining and 32 percent less relevant.

On the other hand, Amazon, Apple, Lyft, Nordstrom and Starbucks have been outspoken in their political positions, and a study by Morning Consult found that young adult Americans “are […] overwhelmingly supportive of brands that take stances on issues: 78 percent agree that companies should take action to address the important issues facing society….”

However Josh Steimle, CEO of digital marketing agency MWI, used politics to successfully gain attention for a client during the 2016 election cycle, without any negative impact. “Our client, Beardbrand, makes beard oil and other beard care products,” Steimle explains. “I thought it would be funny to photoshop beards on the top 10 presidential candidates, including the women, and put the images out there.”

However, Beardbrand had a strict policy against mixing politics in their marketing, so Steimle asked them, “How about if I post this online somewhere and explain that it is a rejected marketing campaign?” Beardbrand agreed, so Steimle hired a freelance artist to add the beards to candidates’ images in Photoshop, and then posted the images in the Buzzfeed Community section under the headline What Would the 2016 U.S. Presidential Candidates Look Like With Beards? He then threw a few hundred dollars into a Facebook ad campaign targeting people who were fans of Buzzfeed, politics and humor, and waited to see what would happen.

Steimle is back at it with a new infographic (see below), which his agency created for Blackbird Label, makers of “the most comfortable slacks in the world.” If politics has got you down, use this infographic to take a break from the negative side of political news and brush up on the history of who wore what kind of pants in the Oval Office (my personal favorite? Hillary Clinton’s honorable mention).

“There is a strong incentive to reference politics in marketing,” Steimle says, “There is a large segment of the population who will look at anything that is tied to controversy. When we create something that references politics we try to trigger that initial reaction of ‘Oh, what’s this, something about Trump? I’ve got to take a closer peek...’ but then combine it with something that tells people it’s harmless to look, that it’s not going to offend them or require them to take a half hour to pen an epic response.”

Steimle gives these seven tips for integrating politics into marketing, with minimum risk:

Involve people from both sides.

If you don’t, your marketing is going to be one-sided, and it will offend someone. Bonus tip: Make sure the people who are involved aren’t easily offended, or you might have a fight during the creation of the marketing campaign. Bonus bonus tip: Add a libertarian or other third-party supporter to the team, someone who can act as a sort of neutral observer.

Focus on consensus.

If you’re going serious, you’re safer to focus on issues virtually everyone agrees on. Climate change, abortion, gun control, gay pride, and immigration are highly contentious areas that are tricky to navigate without offending someone, but everyone agrees it would be nice to have less crime and keep kids off drugs. Does that mean your company can’t wade into contentious issues? Of course not, just be aware of the risks. If you’re going to use a humorous approach, make sure you’re not insulting, and again, focus on things anyone can find funny. Trump’s hair and Hillary’s pantsuits have drawn smiles from both sides of the aisle.

Consider worst case scenarios.

What if the campaign goes bad somehow? How will you react? This is a good exercise to go through when creating the campaign, but not merely to improve the campaign, but also in order to create a real plan B should it be needed.

Communicate with your distribution channel.

During Super Bowl 51 a little-known building supply company called 84 Lumber spent something in the neighborhood of $15M to run a 1:30 minute ad, but the ad everyone saw isn’t the ad they originally proposed. The original ad shows U.S. construction crews building a wall between the U.S. and Mexico. After a difficult journey through the desert, a mother and daughter arrive at the wall, are disheartened to find the way blocked, but then find a door in the wall. They open it, and the ad ends with, “The will to succeed is always welcome here.”

The ad was deemed to be too controversial, since it touched on the controversial topic of immigration. The broadcaster, Fox, rejected it and 84 Lumber had to run a different version of the ad, which drove traffic to a website where people could see the full version of the ad, border wall included.

The ad was regarded by most critics as a failure, and one has to wonder if 84 Lumber could have communicated earlier with Fox on its plans, and with more time produced an ad that would have made it through Fox’s reviews and have been a better marketing investment.

Know your audience.

The 84 Lumber ad also seemed to backfire with a large segment of its target audience. The ad appeared to promote illegal immigration, which irked conservative viewers. The management team at the company strenuously denies this was the intent, nevertheless it seems they could have done a better job understanding how the people they wanted to appeal to would view their ad. Of course this is easier said than done.

Get your own house in order.

Audi ran a Superbowl 51 ad that promotes equal pay for equal work, currently a hot topic with some claiming that women earn roughly 80 percen of what men earn for doing the same work (with others working to refute that claim). Audi’s ad portrays a father wondering whether to tell his daughter about this disparity in income or let her believe that anything is possible. It’s a touching ad that promotes fairness in pay, the only problem is that as Forbes reports, “Audi has no women on its six-person executive team,” and “Its supervisory board (the German equivalent to a U.S. board of directors) is only 16 percent women. That’s below the already-low average of 20 percent for female representation on corporate boards of Fortune 500 firms, and significantly lower than BMW’s 30 percent.” If you espouse an ideal, be prepared to deal with fallout if your own company isn’t living up to it.

Be authentic.

If you’re going to take a political stand, it better come from deep down inside, otherwise you’ll cave when the pressure hits, and then you may lose on an even larger scale. Lands’ End learned this the hard way in 2016 when it ran an interview with notable feminist and outspoken proponents of abortion rights Gloria Steinem for a section called “Legends” that was featured in the company’s catalogue. Canceled orders and complaints from anti abortion customers generated an apology from Lands’ End, which also removed the interview from its website. That decision and apology in turn led to complaints from Lands’ End’s pro-abortion rights customers, leaving the clothier in an unwinnable situation, and making the company appear that it had merely been pandering for attention, rather than promoting deep-seated values.

Mixing politics and marketing is risky, but riding the coattails of the news cycle can pay off if you have the right strategy and execute carefully. And now, All the Presidents’ Pants, a light-hearted infographic that embraces the political arena without offending anyone--we hope.

More from Entrepreneur

Kathleen, Founder and CEO of Grayce & Co, a media and marketing consultancy, can help you develop a brand strategy, build marketing campaigns and learn how to balance work and life.