Two years after the state of Connecticut asked Google if it was using its Street Views vehicles to collect data from unprotected wifi networks, it reached a settlement with the Internet giant.

The $7 million, 38 state settlement will bring in about $520,823 to Connecticut’s general fund — the largest amount to be paid to any of the 38 states taking part in what Attorney General George Jepsen called “protracted and complex negotiation” with Google. Assistant Attorney Generals Matthew Fitzsimmons and Philip Rosario of Connecticut led the action’s eight-state executive committee.

“Google has agreed to sponsor a nationwide public service campaign beginning this summer to help educate consumers about securing their wireless networks and protecting personal information, including online how-to videos, newspaper ads in each state, and daily online advertisements over the next two years,” Jepsen said.

In addition, Google has agreed to secure and eventually destroy the data it collected and has agreed not to use the data in any product or service, he said.

View the compliance agreement here.

Jepsen said Google is currently holding onto the data because of pending lawsuits.

He said the company is making an effort to be a good corporate citizen by going beyond the terms of the agreement and taking voluntary measures such as an advertising campaign to inform consumers.

The agreement also is novel because it’s related to collecting data with technology in Street View vehicles, which no one had ever done before, Fitzsimmons said.

Jepsen said the legal theory of unfair trade practices had never been tested in this context before this settlement agreement. The goal was not so much the money, but rather to get Google to change its corporate culture, he added.

“Initially Google pushed back pretty hard,” Jepsen said. “But in the last year or so they’ve become willing to sit down and view it as a problem to be solved and I give them credit for it because this is all uncharted territory.”

Fitzsimmons said that Google, when first confronted with the issue, didn’t know they were also collecting the payload data being transmitted over these unsecured networks. The purpose of the Street View vehicle was to snap photos for its Google Earth and Google Maps platforms.