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) - Get Report , Apple Inc.  (AAPL) - Get Report and Alphabet Inc.  (GOOGL) - Get Report 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.

Image placeholder title

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) - Get Report and Amazon.com Inc. (AMZN) - Get Report 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 Alphabetare holdings in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells FB,AAPL, AMZN or GOOGL? Learn more now.