The use of data analytics is a complicated area, and in the past organisations have been fined for improper use. The Information Commissioner is on record saying that the use of data analytics is not unlawful provided that data protection regulations and guidelines are followed.
To help everyone get it right, the ICO has launched a data analytics toolkit which is designed for organisations at the beginning of a data analytics project lifecycle. It will help to identify some central risks to the rights and freedoms of individuals, and should form a part of your ‘data protection and design and by default’ strategy.