Digital ad companies are racing to keep up with shifting rules and expectations around consumer privacy rights, as regulators start to frown on once-customary business practices.