Money raised through foundation grants can be larger and more predictable than advertising revenue, but it often comes with strings attached.