Firework singer Katy Perry almost didn't record Teenage Dream.

Singer-songwriter Bonnie McKee, who penned Katy Perry's hit song Teenage Dream, admits she was tempted to keep the track for herself.

Speaking to US radio station 92.3 Now, Bonnie said: ''I loved Teenage Dream. I think that was my favourite one and that was a hard one for me to give up because I've had that teenage theme kind of throughout my music.''

However, the 29-year-old Somebody singer admits the track may not ''have been a hit'' if it weren't for Katy singing it.

Bonnie, who has also penned songs for Britney Spears and Leona Lewis, also has a close friendship with Thrift Shop hitmaker Macklemore, who she grew up with.

She further pitched in: ''When Thrift Shop blew up and I heard it on the radio I was like, 'This is so good!' Then I looked at the video and I was like, 'No way, that's Ben. That's my high school buddy!' ''