Criminal background checks. Credit reports. Applications with a litany of questions. 

Political parties do a lot of detective work to try to prevent their candidates from embarrassing them.

Clearly, it's not always enough. 

There was the Conservative who posted videos to YouTube of himself making prank phone calls in which he simulates an orgasm and pretends to have an intellectual disability. A Liberal candidate who posted to Facebook that marijuana reduces family violence. An NDP candidate who made controversial online remarks about Israel. All three no longer represent their party.

"People who are active often are passionate about the issues that they believe in and are often sharing those views in ways that don't necessarily translate well into politics," Liberal Leader Justin Trudeau said Friday after losing a candidate.

He said in light of the cases that have cropped up recently, all parties are taking a closer look at the social media history of their teams.

Research of a candidate's online presence is typically part of a party's vetting process. So are checks into their financial history, any legal problems and an extensive interview with party officials.

Extra scrutiny 'a healthy thing'

Conservative campaign spokesperson Kory Teneycke said not everything can be caught in advance. He cites the example of candidates who make online posts under a pseudonym.

He also said not all social media remarks carry the same weight.

"I think one of the areas where there's a grey area is when you're dealing with satire or humour. I think you want to look at whether it's somebody's own words or whether it's posting something someone else has said or done."

Teneycke acknowledged that parties will seek out and pounce on controversial comments made by rival candidates. He argued the scrutiny is "basically a healthy thing" and a sign that the system is working, because it stops a potential problematic candidate from representing a party.

However, Teneycke acknowledges problematic candidates tend to be found in ridings where a party is struggling.

"The competitive nature of candidate selection in ridings that are very winnable for a party is much more intense. So it's often the case where these slightly more problematic people end up coming forward in ridings where the party in question is not really much of a player."