Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Silicon Valley technology executive David Goldberg — husband of Facebook Chief Operating Officer Sheryl Sandberg — died after collapsing in a gym while on vacation in Mexico, a source close to the family and officials said Monday.

Goldberg, the 47-year-old chief executive of SurveyMonkey, was found lying next to a treadmill Friday at a hotel near Puerto Vallarta.

His brother Robert, 43, found him in the gym after he didn't return from exercising, according to the attorney general for the Mexican state of Nayarit, Edgar Veytia.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

He said Goldberg had fallen and hit the back of his head, which left a 3-mm (0.1 inch) wound.

Goldberg was alive when he was found, but he died after being taken to a hospital, Veytia said. The cause of death was severe head trauma and severe loss of blood.

Social media was flooded with tributes to the executive over the weekend, and on Monday night President Barack Obama offered his own.

"He was generous and kind with everybody, and cared less about the limelight than making sure that the people he worked with and loved succeeded in whatever they did,” Obama posted on the White House Facebook page, signing the post “-bo.”

“His skills as an entrepreneur created opportunity for many; his love for his family was a joy to behold, and his example as a husband and father was something we could all learn from,” Obama wrote. Sandberg, who has not made a public statement about her husband’s death, thanked the president for "this beautiful tribute."

Goldberg, who married Sandberg in 2004, was a magna cum laude graduate from Harvard who worked at several technology and music companies before starting at SurveyMonkey in 2009, according to his profile on the online survey company's website.

IN-DEPTH

SOCIAL

— Norma Rubio, Liza Torres and Jon Schuppe