Ads for knockoff Louis Vuitton bags pop up on the luxury retailer's official Facebook page. A Toyota advertisement shows up on a news article about a car crash. Or an ad for Dove promoting women's "real beauty" shows up on a Facebook page glorifying domestic violence.

Over and over again, the perils of digital advertising have left tech giants such as Facebook, Yahoo and Google torn between the needs of advertisers and their obligations to their users.

Striking the right balance between the two groups is increasingly important for tech companies that depend on digital advertising revenue. After Facebook reported a 61 percent increase in digital ads during the past quarter, the company's stock climbed 31 percent in one day. The digital advertising industry drew in $37 billion last year and is projected to reach nearly $60.5 billion by 2017, according to eMarketer.