Ads are helping take tech companies to a new level

Scyther5 | Getty images

Big-name tech companies saw drops in their stock on Tuesday, but Robert Peck, SunTrust Robinson Humphrey managing director, is optimistic about tech performance in the second half of the year.

Companies such as Facebook, Google and Netflix have dominated the tech industry by creating revenue through advertisements on their sites.

In May, Facebook announced that it would allow users to control their ad experience through Facebook settings. This gives users the chance to opt out of interest-based advertising and to change their ad preferences.

Google also announced earlier this year that it wanted to make ads more enjoyable and helpful for its users. The company uses algorithms and Google reviewing to block harmful or unwanted advertisements from the website.

"We want to make sure all the ads you see are helpful and welcome and we'll keep fighting to make that a reality," Google said in a statement.

Peck called Google and Facebook the top two tech companies for the year on CNBC's "Squawk Alley," noting the companies' ability to have bigger advertisement budgets and strong returns on investments.

"We've been negative on Amazon, largely because so many people love it. It's rare to find a bear here. So much anticipation has been baked into that now," Peck said. "Not only do you have top lying growth baked in, you have margin improvement in domestic, international and AWS. Not many people are giving credence to oncoming competition from the other players like Google."