California is urging its marijuana-consuming residents to keep it legal.

Regulators launched the "Get #weedwise" digital advertising campaign Friday because the recent legalization of marijuana failed to make much of a dent on the black market. Eradicating illegal sales was a key goal of Proposition 64, which was approved by voters in 2016 and went into effect last year, that requires growers, producers and sellers to be licensed.

The campaign encourages consumers to check the state's online database to make sure the place where they're buying their pot is legitimate.

"We believe that this campaign will directly impact consumer safety by clarifying that only cannabis purchased from licensed retailers has met the state’s safety standards, while sending a clear message to unlicensed businesses that they need to get licensed or shut down," said Lori Ajax, chief of the California Bureau of Cannabis Control.

Though some retailers complain about lax enforcement against rogue shops, high retail taxes and the continued ban of marijuana sales in many cities, sellers generally praised the campaign.

"It's overdue," said Los Angeles dispensary owner Virgil Grant, cofounder of California Minority Alliance, a cannabis industry organization. "If consumers turn against unlicensed shops, then they can’t exist."

The effort will warn buyers that illegal, untested marijuana could contain chemicals, mold and fecal matter.

"What's in your weed shouldn't be a mystery," reads one ad.

"When you have a government agency saying here’s how you know what’s legal and illegal, we feel like it’s a linchpin for success," said Jerred Kiloh, president of the Los Angeles-based United Cannabis Business Alliance.

Retailers also complain that illegal dispensaries can still easily be found on websites such as Weedmaps. The Los Angeles Times estimated about 220 illegal shops are operating in the city of L.A., where 182 are licensed.

Grant, who operates an L.A. dispensary called California Cannabis, said the estimate is low and figures there are about 1,000 unlicensed shops in the city. For every known illegal storefront on Weedmaps, there are three or four underground shops, particularly in South Los Angeles, he said.

State regulators say "Get #weedwise," estimated to cost $1.7 million over three years, is only one front in an effort to boost the legal market. Others include increased enforcement against illegal operations and expediting licensing.

"This is one piece of the puzzle," said Alex Traverso, spokesman for the Bureau of Cannabis Control, "and it's an important one."