Stocks slumped this week after Donald Trump reignited fears of a trade war by announcing tariffs on Chinese imports, and several of the top tech giants fell even more sharply.

The S&P 500, Dow Jones Industrial Average and the Nasdaq each fell around 6% this week, while Facebook Inc.  (FB) , Apple Inc.  (AAPL) and Alphabet Inc.  (GOOGL) all declined even more. Facebook had a particularly rough week after news came to light that a data breach in 2014 allowed the data analytics firm Cambridge Analytica to harvest the data of as many as 50 million users.

"When the market goes down, the best-performing stocks go down more," Wedbush analyst Michael Pachter said.

Facebook stock closed down at $159.39 Friday, dropping 13.9% over the course of the week. The stock plummeted earlier this week, shedding about $50 billion in market cap.

"Facebook's troubles impacted any company that has an advertising model," Pachter noted. In December 2017, advertising made up about 98% of Facebook's sales.

Alphabet's Google also relies heavily on ad sales, and the search giant saw its stock drop 9.5% over the course of the week, closing at $1,026.32 Friday. Apple shares dropped 7.3%, closing at $165.09.

Netflix Inc. (NFLX) and Amazon.com Inc. (AMZN) were least affected among the tech giants this week, falling 5.5% and 4.7% respectively. Netflix shares closed at $301.07 Friday, while Amazon shares closed at $1,495.55.

Facebook, Apple, Amazon and Alphabet are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells FB, AAPL, AMZN or GOOGL? Learn more now.

More from Technology

'What Sells Cars Is Driver Image,' Says VW of American CEO

'What Sells Cars Is Driver Image,' Says VW of American CEO

Could Blockchain Be as Big as the Cloud?

Could Blockchain Be as Big as the Cloud?

Amazon's Next Big Move Could Be Mass Customization

Amazon's Next Big Move Could Be Mass Customization

Why Jim Cramer Is Holding Off on Buying Nvidia Stock

Why Jim Cramer Is Holding Off on Buying Nvidia Stock

As Techlash Grows, Microsoft's $500M Housing Pledge Is More Than Just Good PR

As Techlash Grows, Microsoft's $500M Housing Pledge Is More Than Just Good PR