Sun Life Frozen Fenway 2012 was a huge success.

Boston mayor Thomas M. Menino announced Tuesday via press release that the 16 days of high school and college hockey on Yawkey Way generated $28.8 million in revenue, according to the Greater Boston Convention and Visitor’s Bureau.

Eighty-three percent of the spending came on Jan. 7 and 14 while another $17.9 million came from direct spending. The other $10.9 million came from indirect spending.

“The Sun Life Frozen Fenway games and events helped provide our Boston economy with a good start in 2012,” said Menino.  “We thank Fenway Sports Management and the Red Sox for organizing such a successful event that not only provided a fun winter activity for families from Boston, but also helped generate millions for our area businesses.”

Aside from the hockey games, FSM, the Red Sox and the City of Boston gave more than 18 hours of free ice time to be used for two public skating events.  Some of that time was donated to help raise money for local non-profit organizations and USA Hockey.

More than 80,000 tickets were sold for the hockey games and more than 10,000 people attended the event’s free public skating sessions.