Investors should continue to own mega-cap internet stocks even after their big runs this year, according to one Wall Street firm.

Credit Suisse reaffirmed its outperform ratings and raised its price targets for both Alphabet and Facebook to the highest on Wall Street, citing increasing ad spending for the internet giants.

"Our conversations with advertisers suggest minimal search budget growth deceleration coupled with potentially accelerating spend on YouTube," analyst Stephen Ju wrote in a note to clients Wednesday. "We continue to believe that the opportunity for YouTube to become a significantly larger revenue contributor is still largely ahead of us."

Ju raised his price target for Alphabet shares to $1,350 from $1,100, representing 37 percent upside from Tuesday's close. He now has the highest price target on the stock out of 39 analysts, according to FactSet.

In similar fashion, the analyst is very optimistic on Facebook's fundamentals.

The analyst raised his forecast for Facebook stock to $235 from $190, representing 37 percent upside from Tuesday's close. It is also now the most bullish forecast for the company out of 40 analysts, according to FactSet.

Alphabet shares have rallied 25 percent this year through Tuesday, compared with the market's 14 percent gain. Facebook shares are up 49 percent in the same time period.