How brands are using analytics and automation to increase profit