The song was co-written by Katy Perry's frequent collaborator Bonnie McKee
. "When I came in, they had already kind of started it," McKee recalled to MTV News. "And then we kind of started getting into the visuals and the verses. And again we were at the Maxi Mart, I think, at the corner [when it happened]. And I was really proud of the saber-toothed tiger line and 'sipping on a warm Budweiser' and all that. So it was a really fun song to write with her."