House Ads in the official Ad Plugin

Hi @neil, what would be the approche to integrate ad network’s javascript with the house ads ? It there a theme component that is doing this ?

Many thanks

1 Like

You would probably need to create a plugin that is similar to the AdSense and Ad Manager part of the official ad plugin. House ads is the wrong place to do non-house ads.

8 Likes

Great feature! I have a long list of sponsors, about 20. In my site I randomize them, and would like to here, otherwise I always get the first one on every topic page.

I see three possible solutions:

  1. The feature could add a randomizer. Just a checkbox to randomize the list once before each display, then do each on in turn.

  2. The feature could allow an optional URL to a script which would offer up a random single ad on each call.

  3. I could call that same script in the ad content. I wrote the script but can’t seem to call it. I tried this:

< link rel=“import” href=“http://www.site.com/spon/_banner_spon_comm.php”>

but it didn’t work. Is there a way to fetch from an URL which would be supported by this implementation?

1 Like

The plugin already starts on a random one and cycles through them evenly in order. Are you sure you added all your ads to the topic list top inventory?

4 Likes

Oh my… now I see what it’s doing. Thanks for the point-out! Lots to learn.

While the granularity is handy and allows each to be selected, it would be nice to have an ‘all’ option, or a multi-select UI. I’m imagining a list of ads down the left side and columns of checkboxes for each ad location… although that is not a UI format I have seen used so far.

3 Likes

Is there a possibility to track views and clicks on the House Ads?

3 Likes

Tracking clicks is easy enough with bitly. Not sure about views.

2 Likes

Wauw It took me some time to find where you download this plugin.

Therefore I paste a link: https://github.com/discourse/discourse-adplugin - it might save some time for others…?

5 Likes

Quick suggestion: I think it would be awesome if some of the global ad plugin options were available for each individual ad.

i.e.

  • no ads for personal messages
  • no ads for groups
  • no ads for categories
  • no ads for tags

Also, perhaps a new option for ‘no ads on homepage’ (both for global and individual ad settings).

Then you could target house ads, showing different ads for different categories/tags and the homepage.

An alternative would be for the targeting to be positive instead of negative, so you actively select the locations where the ad will be displayed - instead of where it won’t be displayed.

5 Likes

This is fantastic! Great job y’all!!!

5 Likes

Any chance of having settings per ad? I’d like to create an ad that displays only to one group. But I don’t want to turn off ads completely for all other groups.

Edited to add this question: Can this perhaps be achieved by editing the CSS for the particular ad I want to display only to the one group?

1 Like

Yes this is a way to do it. The primary group of the current user will be used to add a class to the body tag on the page. Since my primary group here is “team”, the body tag has a class “primary-group-team” for me.

2 Likes

Hmmm… I can only target the primary group, though? That’s not going to work in my situation.

1 Like

Do you check in Settings -> Ad Plugin?

2 Likes

We don’t support settings per ad, so there’s no way to do that without looking at the primary ad group.

4 Likes

Quick followup question. Is it possible to target users without a primary group? If I could just create an ad that was shown to people who hadn’t joined any groups yet, pushing them to join a group, I’d be a happy camper.

1 Like

Hi Neil, did you ever create an option to restrict an ad to nominated categories? if so, or if you have a work-around, that would be brilliant. In my case, each advertiser is typically only relevant for one category.

4 Likes

No that feature hasn’t been created and we don’t have a spec for it yet. There isn’t a good workaround other than using a css class to hide ads when they’re in the wrong category.

3 Likes

But it’s a valid point, showing ads for specific category is definitely useful. I use discourse with category as different language, so using different language ads for specific categories would be nice.

2 Likes

I am trying the official Ad plugin for in house ads and I am wondering if it is possible to show ads to custom locations (other than #available-locations-for-ad-display).

I have added a custom HTML/CSS header using the Edit HTML/CSS feature and would like to be able to put in house ads managed in the admin with the plugin in my custom header.

Is it something doable ? Thanks !

3 Likes