Beyonce and Jay-Z's marriage has been through some rough patches, especially because of the latter's cheating scandal, but the couple managed to pull through and make it work.

A report in People Magazine has details on what helped the couple overcome their marital issues, including infidelity.

A source told People, "It was very rough for them to stay married. It took Beyonce a long time to trust again. She was struggling to move on and forgive. But keeping her family together was very important."

The insider goes on to reveal the primary reason why they are still together. "If it wasn't for Blue Ivy, they might not be together. It took them years to get to the point where they are now," the person, who worked through their issues in therapy sessions, said.

The couple who are married for nine years now, welcomed their first child, Blue Ivy Carter, in January 2012. The insider claimed that they are both "very proud that they overcame huge marital issues and happy they were able to move on as a family".

Beyonce openly addressed the infidelity issues in her hit album Lemonade, and her husband later rapped about it in 4:44. The Reasonable Doubt hitmaker recently addressed the reports about his infidelity in a rather candid interview with the New York Times.

Admitting that an emotional shutdown led to infidelity, the 48-year-old rap legend said, "You have to survive. So you go into survival mode, and when you go into survival mode what happen? You shut down all emotions. So even with women, you gonna shut down emotionally, so you can't connect.

"In my case, like it's, it's deep. And then all the things happen from there: infidelity," he added, admitting for the first time that he cheated on his wife.

The American rapper also opened up about how he felt listening to his wife's album, Lemonade. He said it was "very, very uncomfortable" and it fellt like being "in the middle of a hurricane".

"The best place is right in the middle of the pain. And that's where we were sitting. And it was uncomfortable. And we had a lot of conversations. [I was] really proud of the music she made, and she was really proud of the art I released," he told NYT.

Jay-Z, who welcomed twins with Beyonce in mid-June — daughter Rumi Carter and son Sir Carter —also spoke about wanting to walk away, but realising it was not the right thing to do.

"You know, most people walk away, and like divorce rate is like 50 percent or something 'cause most people can't see themselves. The hardest thing is seeing pain on someone's face that you caused, and then have to deal with yourself," he told the outlet, revealing therapy helped him in tough times.

"So, you know, most people don't want to do that. You don't want to look inside yourself. And so you walk away."