# House Ads in the official Ad Plugin

**URL:** https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715
**Category:** Announcements
**Tags:** advertising
**Created:** [May 2, 2019, 8:30pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715 "2019-05-02T20:30:39Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [May 2, 2019, 8:30pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/1 "2019-05-02T20:30:40Z")

</div>

> ⚠ **IF YOU ARE RUNNING AN AD BLOCKER RIGHT NOW YOU WILL HAVE A _VERY BAD TIME_ TRYING TO SET THIS UP!** TURN IT OFF BEFORE PROCEEDING DOWN THIS PATH! You’ve been warned. 🐉
> 
> Also be aware of browsers with built-in ad-blocker functionality (eg. Brave)

I’ve been working on adding support for house ads in the ad plugin and would like some feedback about how you’d use it. Here’s a video to demonstrate how I have it working now:

You define a set of ads using html and the usual theme support, and then add them to the ad placements that are currently available. If the ads or placement settings are changed, clients pick up the changes immediately. Placements with more than one ad will cycle through them evenly in order, starting with a random one.

Right now, house ads will always show instead of other configured ad networks. I’m not sure what the rules here should be.

> 📢 Need help setting up the HTML for your ads? Check out the examples in the House Ads Templates collection!

> [@House Ad Templates](https://meta.discourse.org/t/house-ad-templates/122004):
>
> House Ad Templates This guide provides templates for creating house ads using the [Official Discourse Ad Plugin](https://meta.discourse.org/t/advertising-plugin-for-discourse-serve-ads-on-your-discourse-forum/33734). warning Important: Disable ad blockers (including those built in to browsers, e.g. Brave) before working with these ad customizations. Before You Start Create a “House Ads” [theme component](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) to store: CSS for your house ads [Uploaded images](https://meta.discourse.org/t/include-images-and-fonts-in-themes-and-components/62459) used in ads Add the component to all active themes where ads will appear Optimize images using [TinyPNG](https://tinypng.com) to reduce file size while maintain…

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [May 2, 2019, 8:45pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/2 "2019-05-02T20:45:46Z")

</div>

The immediate benefit that comes to mind is (potential) avoidance of ad blockers and general privacy issues associated with network ads.

At the moment Google Ad Manager serves the purpose to show my house and directly sold ads and it fills in remaining inventory with AdSense ads.

Allotting a percentage for house ads in a mixed ad setup could complicate reporting in Google Ad Manager, I think.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [May 2, 2019, 8:52pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/3 "2019-05-02T20:52:54Z")

</div>

Yes DFP can definitely do it all, but as you say this feature shouldn’t be detectable by ad blockers. And I’ve already been trying to recommend DFP as the solution for serving house ads, but the answer is usually that DFP is too hard to understand.

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [May 2, 2019, 9:12pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/4 "2019-05-02T21:12:37Z")

</div>

Yes, this can definitely be the preferred method for anyone looking for a simpler ad serving solution.

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [May 4, 2019, 6:38pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/5 "2019-05-04T18:38:34Z")

</div>

just curious, is this the output of house ads?

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/3/43066110690907fa01341ea1a203e4500bbd1f0e.png)

it’s an interesting action from meta, your choices are inspiring and human-based 👏. I hope the business goes forward strongly as always.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 4, 2019, 7:02pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/6 "2019-05-04T19:02:24Z")

</div>

Yes, we are testing the new feature here on Meta for now so we can check for bugs.

---

<div class="post-metadata">

### Author: ![sat](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@sat](https://meta.discourse.org/u/sat)
#### Post date: [May 4, 2019, 7:24pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/7 "2019-05-04T19:24:57Z")

</div>

This will be a great plugin! thanks for making it. Here are my thoughts…

- It will be good if there is ad rotation for the same spot, in house ads. This will also help to promote sites important posts.
- Time based ads is also a good idea, 50% in house ads and 50% other type of ads.
- Provide option for text link, html ads and also banner ads? May be admin can upload banner and provide related link. This ads can run on posts only.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [May 4, 2019, 7:46pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/8 "2019-05-04T19:46:23Z")

</div>

If you’ve been browsing Meta you should see that the adverts at the bottom of the page are rotating.

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [May 4, 2019, 8:28pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/9 "2019-05-04T20:28:03Z")

</div>

I haven’t played around with the ad plugin yet, but is it possible to run house ads alongside network ads? I may have a use case for that in the community I run.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [May 5, 2019, 5:09pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/10 "2019-05-05T17:09:29Z")

</div>

> [@sat](#):
>
> Provide option for text link, html ads and also banner ads? May be admin can upload banner and provide related link.

This is all currently possible because you can make text links and show images with simple html. Upload your assets in a staff-only topic or in the theme component where your house ads’ css is defined.

> [@justin](#):
>
> I haven’t played around with the ad plugin yet, but is it possible to run house ads alongside network ads? I may have a use case for that in the community I run.

That’s the idea. Something like this is what I’m thinking of going with:

> [@sat](#):
>
> 50% in house ads and 50% other type of ads.

How would you want to serve them alongside another ad network?

---

<div class="post-metadata">

### Author: ![mustachianpost](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mustachianpost/32/111646_2.png) [@mustachianpost](https://meta.discourse.org/u/mustachianpost)
#### Post date: [May 5, 2019, 5:46pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/11 "2019-05-05T17:46:18Z")

</div>

Amazing work, very timely as it avoided me going through the full setup of Google Ad Manager 🙂 Thanks a lot for your work!

---

<div class="post-metadata">

### Author: ![Jeremie\_Leroy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jeremie_leroy/32/84427_2.png) [@Jeremie\_Leroy](https://meta.discourse.org/u/Jeremie_Leroy)
#### Post date: [May 5, 2019, 6:28pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/12 "2019-05-05T18:28:26Z")

</div>

@neil, Great plugin,

1- I was wondering, how to make the image responsive, it is not good on the mobile version. I use the below code

I added it here → [https://francais-a-londres.org/](https://francais-a-londres.org/)

`<a href="#" class="h-creative h-donate"> <div> <img src="https://fralondres.s3.dualstack.eu-west-2.amazonaws.com/original/2X/3/348c560154acd77dd653aca6a4a57c53e4ae49ca.png"> </div> </a>`

2- is there a way to track the number of views on the image and number of clicks ?

Many thanks

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [May 5, 2019, 7:09pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/13 "2019-05-05T19:09:16Z")

</div>

> [@Jeremie\_Leroy](#):
>
> 1- I was wondering, how to make the image responsive, it is not good on the mobile version.

You can make it responsive by adding this to your css

```plaintext
.house-creative > p > img {
    max-width: 100%;
    height: auto;
}

.widget-connector {
    max-width: 800px;
}

@media only screen and (max-width: 800px) {
    .widget-connector {
        max-width: 100%;
        height: auto;
    }
}

```

EDIT 2: Had to add an @media for the inline ads as well because they were spilling outside the container.

EDIT: I also had to add this to center the inline ads on mobile, be sure to add it your mobile only css

```plaintext
.house-creative.house-post-bottom {
    margin: 0px 10px 0px 10px;
}

```

> [@Jeremie\_Leroy](#):
>
> 2- is there a way to track the number of views on the image and number of clicks ?

I would recommend using UTM links or using bitly would be very simple.

@neil I love this plugin, the only improvement I would like to see is to have the ability to show different ads to anon vs logged in users on top of the existing ability of having them hidden altogether for specific groups.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [May 5, 2019, 7:42pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/14 "2019-05-05T19:42:41Z")

</div>

> [@neil](#):
>
> Maybe a setting like “show a house ad after X other ads have been shown”. Setting to 1 means half ads shown will be house ads,

It would be better to make it a percentage otherwise you cannot go above 50% house ads. And it will be more intuitive.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 5, 2019, 8:36pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/15 "2019-05-05T20:36:21Z")

</div>

> [@davidkingham](#):
>
> @neil I love this plugin, the only improvement I would like to see is to have the ability to show different ads to anon vs logged in users on top of the existing ability of having them hidden altogether for specific groups.

You can put both versions inside each ad, and hide the appropriate when `.anon` is on the body using CSS.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [May 7, 2019, 6:34pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/16 "2019-05-07T18:34:16Z")

</div>

4 posts were split to a new topic: [AdPlugin: hide for groups not working](https://meta.discourse.org/t/adplugin-hide-for-groups-not-working/117099)

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [May 6, 2019, 7:53pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/17 "2019-05-06T19:53:27Z")

</div>

> [@davidkingham](#):
>
> FYI the `no ads for groups` setting is not working, not sure how to help troubleshoot this one.
> 
> Edit: Interestingly this seems to be working opposite as intended, when I have the groups added it hides the ads for anonymous users. When I remove the groups the ads come back for anon.

Hmm I can’t reproduce it. I changed meta so that people in the “Team” group don’t see ads (we already wear Discourse shirts and socks every day). Anon can still see ads and I can’t. Seems to be working.

> [@michaeld](#):
>
> It would be better to make it a percentage otherwise you cannot go above 50% house ads. And it will be more intuitive.

Sure, percentages work too.

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [May 6, 2019, 8:55pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/18 "2019-05-06T20:55:18Z")

</div>

There are other reasons not to use Google for managing your house ads besides complexity, but that’s reason enough. I’m really looking forward to using this, and we would only be using it for house ads 100% of the time.

---

<div class="post-metadata">

### Author: ![pradeepkumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pradeepkumar/32/119914_2.png) [@pradeepkumar](https://meta.discourse.org/u/pradeepkumar)
#### Post date: [May 6, 2019, 9:12pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/19 "2019-05-06T21:12:59Z")

</div>

Implemented this on our [DeviceBAR Forum](https://forum.devicebar.com), it’s so cool. I totally love it. I just have to figure out the mobile responsiveness part now. Looking forward to seeing more updates related to this plugin.

 ![35](https://global.discourse-cdn.com/meta/original/3X/4/e/4eb1e0618aac5a0915a22b007c134399f9425031.png)

---

<div class="post-metadata">

### Author: ![Jeremie\_Leroy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jeremie_leroy/32/84427_2.png) [@Jeremie\_Leroy](https://meta.discourse.org/u/Jeremie_Leroy)
#### Post date: [May 7, 2019, 2:57pm UTC](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715/23 "2019-05-07T14:57:48Z")

</div>

@pradeepkumar Nice one, Below is ours with the code, please let us know when you find out about the responsiveness on mobile ;).

Best,

 ![27](https://global.discourse-cdn.com/meta/original/3X/f/e/fe4f057b3de9e963847d95fb50e2819b74acb6fa.png)

```
<a href="https://francais-a-londres.org/about">
    <div>
       <img src="https://fralondres.s3.dualstack.eu-west-2.amazonaws.com/original/2X/3/348c560154acd77dd653aca6a4a57c53e4ae49ca.png">
    </div>
</a>

```

[Next page](https://meta.discourse.org/t/house-ads-in-the-official-ad-plugin/116715.md?page=2)
