Welcome to the club, we are in the same boat. But, a quick heads up, this won’t work with theme components, so the suggested answer won’t work. We’ve gone down this path, as have others (see our topics on this). With theme components, the ad script won’t show in the body where it supposed to show. The commentator suggesting using script in the /head may not be familiar with how ad scripts need to actually be implemented. We tried theme components and couldn’t do it because there are limitations of what you can do with theme components.
Ultimately, you will need a plugin to do what you need to do to show from other ad networks. Unfortunately, no plugin exists for this yet. The only hope is that Discuss will add a generic ad script in the Ads plugin to support third-party ad scripts that need to be injected into the area of the ad. Right now you can basically only use Google DFP, but if you use another ad provider, you are screwed and can’t monetize the forum. This is unfortunate because there are many other good ad networks (e.g. Adbutler, Openx etc.), and you shouldn’t be forced to use Google DFP to serve ads.
Well here’s to hoping that Discourse will add a generic ad script to the ads plugin. I don’t particularly see why this is difficult to do, but honestly I have no clue on to program in Ruby and Ember, so I’m not sure how to do it. In theory, all they need is a textarea in the plugin that will accept script tags and then inject those in the ad areas the plugin already designates. Having a generic script box, as opposed to a box that will only accept straight up HTML, will take care of every single ad network basically, without the need to implement specific code for every single ad network.