House Ads not showing

I’ve got AdSense ads running great, but I’m trying to create a ‘House Ad’. I’ve input the ad code into the plug-in, and it has ‘replaced’ the AdSense code (at least the AdSense code has disappeared), but the House Ad isn’t appearing.

Any idea please? To add, I am looking to run House Ads only - to replace Google.

Are JavaScript & iFrame ad codes supported? Is one recommended over the other?

Most probably CSP is blocking your house ad codes.

Did you add the domains to script-src ?

1 Like

I have already disabled CSP to allow AdSense ads to work.

Did you add the domains to script-src ?

I’ve not experienced this. How do I do this please?

2 Likes

If You’ve disable CSP then that part doesn’t apply to you.

Did you try the F12 developer console to check if the ad codes are loading properly?

2 Likes

I’ve had this issue as well. I can tell from going to the developer console, that I can only see this:

image

Other than that, I had " DevTools failed to load SourceMap Could not load content for bla bla bla: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE" for several of my official plugins.

However, this is a issue in Chrome DevTools: Google Chrome DevTools failed to parse SourceMap: chrome-extension - Super User

An easy way to reproduce the problem for any developer reading this. Simply add this script into the House Ads and see if it shows up:

<script id="tcg-a2"
    data-affcode="DuelistsUnite"
    data-width="728"
    data-height="90"
    data-category-id="2"
    data-campaign="affiliate"
    data-source="DuelistsUnite"
    data-medium="DuelistsUnite"
    src="https://content.tcg20life.com/tcgafa.js" async>
</script>

There’s nothing wrong with the script itself. It’s an affiliate ad and it will show up in any regular html site. Something from Discourse itself is blocking it.

bug

Just a side note @AntiMetaman

We use all IFRAME tags to avoid the “well-documented issues” with Javascript tags and Ember.

You can Google for more on this…, if interested @AntiMetaman

Hope this helps you in some small way.

Metro 2033

2 Likes

Thanks, the iframe solution worked like a charm. Just have to make sure to use frameBorder=“0” scrolling=“no”.

i.e. House Ads is useless then?

3 Likes

In one of my testbeds, I forked the ads plugin, stripped out all the ad networks except for house and heavily modified to serve tags from our Revive ad server using all IFRAME tags.

Worked fine…

1 Like

Ok so useless then. :wink:

I did not find it to be “useless” at all. For example, I used a lot of the code from the original plugin, modified it, and used all the plugin-hook locations (placements) as well.

In fact, it was the “house” part of the plugin which I used as the basis for the tags for our Revive ad server tags.

In summary, I thought the “house” part of the plugin code was very useful, @AntiMetaman and that code was the basis for my entire plugin modification to build a “Discourse ad server plugin for the Revive ad server”.

2 Likes

I see that it was not useless for you since you created your own “revive ad server”. However, I am finding it useless if I cannot display an affiliate ad unit using the House Ads which I believe for it to be its original purpose. You told me to use iframe instead and that worked. That’s why I said it was useless for me. I am sure others find it useful for other purposes like reverse engineering a new plugin.

Understood.

As you have discovered, SCRIPT (javascript) tags will not render as “house ads” due to some Ember restrictions.

However, you should be able to display any IFRAME or HTML tag as a “house ad”; because “house ad” is simply a slot for running your own tags (as long as they are HTML or IFRAME tags).

HTH

2 Likes

Yes, putting the iframe as a ad unit in House Ads will work, but I have limited options. There is no option to put it at the bottom of my page. There’s only top of topic list or between.

Correct (for the most part).

In that case, you can easily do as you wish and just add an IFRAME tag to the bottom of the page; or you can modify the plugin to add another slot for “house ads”; per your own design for ad placements.

Anyway, glad the IFRAME tag, direct insertion, is working out for you. That’s what’s important.

2 Likes

@neounix are you interested in maintaining the plugin GitHub - unixneo/neo-revive-discourse: The NOT Official Discourse Revive Ad Server Plugin by Neo (WIP)? I can open a marketplace gig in case you’re interested.

Is there any conflict between the built-in House Ads and the Ad plugin that keeps House Ads in the Topic List Tops Ads zone from showing when there is a DFP ad zone in the same place? Shouldn’t both show up - one from House Ads and one from the DFP?

I noticed the google iframe in the topic list by hitting F12 - it seems to be there whether or not there is a DFP Publisher ID entered in the DFP section of the Ad Plugin.

I would like to stop using DFP altogether and just manage ads via House Ads.