Facebook is allowing employers — including federal, provincial and municipal governments — to post job ads that target prospective employees in a way that some experts say could violate Canadian human rights law, CBC News has learned.

An investigation by CBC News found dozens of employers across Canada posted ads that were microtargeted at specific age ranges.

While the texts of the ads themselves don't mention age, the settings that determine who sees the ads often exclude older workers. That might mean, for example, that those over age 45 or 50 wouldn't see an ad for a job for which they might qualify.

A smaller number of the ads were targeted specifically at either women or men.

Facebook recently announced that, starting at the end of the year, it will bar U.S. employers from excluding workers from seeing Facebook job ads according to criteria like age or gender, in order to settle legal cases filed against it by civil liberties groups.

However, Facebook spokesperson Alex Kucharski said the change will only apply within the U.S.

"We will require any advertiser offering housing, employment and credit that wants to reach people in the U.S. to meet these new requirements — doesn't matter which country they are based [in]," he said.

"We will examine extending these requirements globally in the future."

The non-discrimination policy posted on Facebook's website says that "ads must not discriminate or encourage discrimination against people based on personal attributes such as race, ethnicity, color, national origin, religion, age, sex, sexual orientation, gender identity, family status, disability, medical or genetic condition."

If that is ever challenged, both Facebook and the companies that are placing those ads will have a hard time explaining themselves. - Employment lawyer Paul Champ

However, a review by CBC News of 264 ads posted on Facebook found job ads with settings that exclude some Canadian workers.

Under federal and provincial human rights laws in Canada, employers aren't allowed to restrict who sees job ads based on age, gender, race or religion, unless the restriction is a bona fide occupational requirement or is part of a specific initiative, like a student summer job program.

An employer can legally limit its job outreach to adults by targeting the ads at people 18 and older, but can't legally target people who are, say, 18 to 40 without demonstrating an occupational requirement.

Using an ad collector developed by the U.S. investigative journalism organization ProPublica, CBC News was able to identify nearly 100 Canadian employers who have run job ads on Facebook since November 2017 that would have been seen only by workers in a specific age range. Ads that appeared recently on a Facebook account whose profile was set to 34 years old were also gathered.

(The ads identified represent a fraction of the number of job ads that may have run in Canada during that period, since ProPublica's ad collector only gathers ads received by users who have volunteered to download its browser extension.)

Of the more than 260 job ads identified, an estimated 60 per cent were targeted at people in particular age ranges in a way that could contravene human rights law unless the employer could demonstrate the restriction was legitimate.

Ten ads also targeted women, while six targeted men.

Employment lawyers Paul Champ and Janice Payne reviewed the job ads data gathered by CBC. They said many of the ads appear to violate Canadian human rights law.

"Many of them were compliant, saying 18 and older, which is perfectly fine, but others you saw ... discriminating against older workers," said Champ.

"In my view, if that is ever challenged, both Facebook and the companies that are placing those ads will have a hard time explaining themselves."

Kucharski said advertisers sometimes design ad campaigns so that different age groups see different ads, while the overall campaign covers all age groups.

A number of the employers contacted by CBC News said their microtargeted job ads on Facebook were part of larger campaigns that could have been viewed by workers outside the target range.

Payne said that doesn't really "solve the problem."

"It's still a problematic practice to microtarget a certain age group or a particular gender," she said.

Government agencies also targeting age groups

David Soberman teaches marketing at the University of Toronto's Rotman School of Management. He said Facebook's ability to microtarget ads makes it a popular platform for marketers.

"With this sort of targeting, you can really zero in on people," he said.

While governments are charged with enforcing federal and provincial human rights laws, CBC News found that government agencies and institutions also microtargeted job ads based on age.

The Canadian Coast Guard is running age-targeted ads, looking for post-secondary students for its Environmental Response Program and fields like search and rescue.

"For this particular ad, [the] Coast Guard targeted the 25-44 age demographic in Canada; 71 per cent of users of this group are on Facebook, with this ad reaching 96 per cent of this group," wrote Coast Guard spokesperson Barre Campbell.

When Elections Canada was looking for a returning officer for the riding of Scarborough Southwest last October, it targeted its Facebook ads at people aged 35 and older in Toronto who were interested in higher education.

Ghislain Desjardins, spokesperson for Elections Canada, said it used similar targeting information for 25 returning officer jobs.

"Based on conversations we had with clients, returning officers are generally retired or professionals/contractors. Tasks require experience in many areas in which people under 35 don't necessarily have the required qualifications."

Three of the 25 returning officers hired were under age 35.

The Yukon Health and Social Services department was running Facebook ads for continuing care workers targeting 21-35 year olds, and ads for physiotherapists targeting those aged 22-49.

That promptly changed when CBC News contacted the department with questions about the ads.

"We had unintentionally restricted potential employees from seeing our Canada-wide job ads," wrote Yukon Health and Social Services spokesperson Roni-Sue Sparvier. "We have changed the age range and opened it up to the ages 18 to 65+ in Canada."

The City of Edmonton's Fire Rescue Service also said its May 2018 Facebook ad targeting men aged 18-44 was a mistake.

"It was our intention to focus on men and women in the 2018 Facebook recruitment ad for Edmonton Fire Rescue Services," wrote spokesperson Carol Hurst. "Unfortunately, we were unaware of the error in the ad when it ran and disappointed when we learned of it."

Hurst said there was no occupational requirement to set the upper limit of the ad's age range at 44.

Hurst said the service's 2019 Facebook ads are targeted at both men and women and the service actively tries to recruit women.

The Edmonton Police Service ran a job ad last August microtargeting men aged 18-35. Spokesperson Cheryl Voordenhout said the service runs separate ads targeting men and women.

"We split our ads equally between males and females because we actually found that when we didn't, the ads were being served to males more often due to the way the Facebook algorithm works. Splitting the ads actually creates a more equitable distribution."

Voordenhout said the average age of recruits is between 25 and 30. "To make the most effective use of our limited advertising budget, our recruiting advertising focuses on an age group that tends to be the most interested in applying."

The Seneca College ad seeking teachers. Seneca said it targeted its ads in part for budgetary reasons. (CBC News)

Seneca College also cited budgetary reasons for its decision to target an ad for teachers at Ontario residents aged 25 to 55.

"Based on budgetary limitations, as Facebook ad costs are calculated per click, that was the age range chosen to find qualified applicants to fill teaching positions," wrote spokesperson Amar Shah. "We also posted it through organic social media, which was not targeted."

Science North, which targeted an ad for a strategic adviser education initiative last May at people in Sudbury, Ont. aged 28 to 55, said the ad was part of a larger, non-targeted advertising effort.

Director of talent management Nick Ayre blamed Facebook for the targeted age range, saying its system won't accept an ad without an age range to target.

Facebook's ads manager requires that an advertiser choose a specific age range, which can be anywhere from 13 years old to 65 and older.

The National Arts Centre said the age range on this ad was set by default, and was not intentional. (CBC News)

Ottawa's National Arts Centre (NAC) ran an ad in January for a French communications officer that targeted people in Ottawa interested in music aged 20 or older, and another ad last August targeting people in Ottawa aged 18 to 55 for 20 job opportunities.

Annabelle Cloutier, spokesperson for the NAC, said the August ad was targeted by mistake.

"The age targeting for the job posting of approximately 20 positions applied itself by default through the Facebook application based on settings from a previous unrelated post," she said. "By the time we realized this, the posting had already run its course. Our intention was not to narrow or target a specific age group."

The second ad was set to 20 years and older because the NAC was looking for someone with a university degree and five to eight years of experience, she said.

Ikea said microtargeting of a call centre job ad was a "regrettable oversight" and that it had taken steps to prevent this in the future. (CBC News)

The list of employers microtargeting job ads by age also includes corporate giants with household names.

Ikea ran an ad for a call centre operator last October, targeting people 18 to 40 years old in Montreal who speak English.

Spokesperson Stephanie Harnett said Ikea's job ads are designed to appeal to as wide an audience as possible and the Facebook ad was only one facet of its campaign.

"Our goal with recruitment campaigns is always to build a balanced and diverse workforce. The micro-targeting on Facebook to the defined age range was a regrettable oversight and we have put measures in place to ensure that this doesn't happen again."

One ad for Canadian Tire targeted people aged 18 to 49 in Toronto for seasonal jobs, while a second targeted men aged 18 to 49 for seasonal warehouse positions.

Spokesperson Cathy Kurzbock said the ads were targeted at both men and to women at the same time and also ran on Indeed and LinkedIn, where they could be accessed with a keyword search. The age range for the Facebook ads was determined "based on the job posting minimum age requirement and also who we think is most inclined to click on the ad."

Payne said she would like to see Canada's human rights commissions "try to take steps under human rights legislation, or other legislation such as privacy legislation, to address this."

Champ said that if the companies aren't prepared to act, governments should.

"I think there is the broader issue ... about social media companies that are coming up with all these different ways of aggregating data and microtargeting their advertising," he said.

"Right now it doesn't look like these companies are really thinking about that. They're just thinking about, 'Is it profitable.'"

Elizabeth Thompson can be reached at elizabeth.thompson@cbc.ca