(pictured) co-wrote and co-produced "Heart Attack". "Heart Attack" was produced by
Mitch Allan and
Jason Evigan of "The Suspex", who co-wrote the song along with Lovato,
Sean Douglas,
Nikki Williams, and Aaron Phillips. Nikki Williams said the song was written two years prior to its release. She explained: "At the time I was going through some relationship stuff, and I was just so depressed, so when I got into the session I thought, 'You know what? I'm gonna pour it all out there, and get it off my chest'". The song was first intended for Williams, but her record label rejected it. When Lovato heard the song, she recorded it before altering a few lyrics. In an interview with
MTV, Evigan explained: According to him, the first version also contained a
dubstep breakdown, which was removed for Lovato. He also stated, "Demi has magic to it where she has so much sass in her voice but yet so much power and all those really high notes at the end, she added that on the spot." A trailer of "Heart Attack" was released on February 12, 2013. The song was originally set to premiere on
On Air with Ryan Seacrest, but leaked online on February 24, 2013, springing
Hollywood Records' marketing department into early action. "I was having an Oscar party at my house when [the leak] went down, so I had to excuse myself and have a conference call," said Hollywood Records' head of global marketing Robbie Snow. One day after its leak online, Hollywood Records quickly released the song on
iTunes Store,
Spotify and other streaming services on February 25, 2013. She also released an official Vevo clip of the song the same day, and asked Seacrest to link his
Twitter followers to the track. Additionally, a lyric video debuted on March 1, 2013. Lovato prompted fans to unlock the video by tweeting song lyrics and the hashtag #UnlockHeartAttack, which became a worldwide trending topic on Twitter. ==Composition==