Google and Facebook’s ad networks placed promotions for major brands before apps were banned.