The Internet Advertising Bureau has hailed the ruling - which will allow advertisers to carry on using cookies so long as it is made clear how the advertising data can be used when consumers leave their information - as a "victory for common sense".
The Parliament's proposal had held that cookie information was an infringement of rights, and that internet companies should not store personal information without an individual's permission.
It had originally wanted to ban cookies on the grounds of consumer protection.
Advertisers argued that it was in consumers' interest, because it would save them the effort of adding their details every time they visited a site.
The Spanish government - which holds the presidency of the European Union - proposed last-minute amendments, to avoid it going to a further stage.
The Parliament successfully completed its second reading of the directive without the need for it to go to this potentially protracted third reading.
The amendments removed the requirement to provide information in advance of cookies being used.