They play local ads? Google lets you advertise in an area, you see them in Google, in youtube, in facebook etc. And since these companies has much stronger local brand recognition than the American giants they win out in the local markets.
Also advertisements is more than just spending money, you need to mesh with the local culture as well. An American multinational doesn't really mesh well with most people and people reject their marketing, while local companies understand much better what the local people wants. In theory the giants could just hire locals, but in practice that has been really hard for them to do, as we can see every country has their own grocery store chains, brands etc.