Microsoft has agreed to purchase digital marketing company aQuantive in a deal worth $6 billion.