Robert Mercer and Rebekah Mercer attend the 2017 TIME 100 Gala at Jazz at Lincoln Center on April 25, 2017 in New York City.

Republican megadonors Robert and Rebekah Mercer donated over $12 million to a variety of conservative causes last year despite distancing themselves from being associated with President Donald Trump.

In 2018, the Mercers signaled to their allies that they were not looking to directly support Trump's presidency after spending millions to get him elected in 2016. The family came under unwelcome public scrutiny for its support of Trump.

However, as they refrained from backing Trump's reelection effort, the Mercers invested $8.1 million into dark money group the Donors Trust, according to their family foundation's 2018 tax return, first reviewed by CNBC. The trust was specifically created in the late 1990s to keep the identity of their donors anonymous while they funnel millions to often conservative groups.

In the past, Donors Trust has contributed to a wide variety of organizations such as the Federalist Society, Project Veritas and the Cato Institute. The group's most recent tax return, from 2017, shows they brought in $110 million through contributions and grants.

The Mercer family foundation finished 2018 with assets worth up to $24 million, their latest filing shows. Mercer and his three daughters, Rebekah, Jennifer and Heather, are all listed as directors of the foundation.

Representatives for the Mercers did not return a request for comment.

The Mercers also gave $500,000 to the Government Accountability Institute, or GAI, a think tank founded by conservative investigator Peter Schweizer and former White House chief strategist Steve Bannon. The two Trump allies have pushed conspiracies against their rivals, including Hillary Clinton in Schweizer's book "Clinton Cash."

Rebekah Mercer is listed as GAI's chairwoman. The family funded Breitbart News, which Bannon ran before he joined the Trump administration. But Mercer in 2017 distanced himself from him and the conservative news outlet when he stepped down as co-CEO of hedge fund Renaissance Technologies. Mercer sold his stake in Breitbart to his daughters at that time.

GAI has reportedly played a role in pushing, at least in part, a conspiracy that links former Vice President Joe Biden and his son Hunter to corruption in Ukraine. Schweizer's most recent book, "Secret Empires," has a chapter called "Bidens in Ukraine." GAI has claimed that the former vice president abused his power to protect his son from an investigation into Burisma, a Ukrainian energy company on whose board Hunter Biden worked.

Beyond some of the conservative groups, the Mercers also donated to a slew of nontraditional science ventures such as a $250,000 contribution to the Multidisciplinary Association for Psychedelic Studies, which, according to its website, "develops medical, legal, and cultural contexts for people to benefit from the careful uses of psychedelics and marijuana."

They also spent $300,000 on the Oregon Institute of Science and Medicine, a nonprofit that the research group Map Light previously described as an organization that's skeptical of climate change.