House Ads in the official Ad Plugin

how to fix this ?

i like to be like this

Are there errors in the javascript console? Looks like it should work to me. I’ll leave it to ad experts to give suggestions about impression tracking.

The CSS we use for the let’s encrypt is this. Adjust for your html:

.house-creative {
    margin: 0 !important;
}

.h-creative {
    display: block;
    clear: both;
    max-width: 500px;
    color: $primary !important;
    background-color: $secondary;
    .container {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 6px 0;
    }
    p {
        margin: 0 20px;
    }
    .product-image {
        width: 150px;
        height: 150px;
    }
    img {
        max-width: 150px;
        max-height: 150px;
        &.mozilla {
            max-width: 300px;
        }
    }
    .big {
        font-size: 24px;
        line-height: normal;
        padding-bottom: 10px;
    }
}

.mobile-device .house-creative {
    .product-image {
        width: 120px;
        height: 120px;
    }
    img {
        max-width: 120px;
        max-height: 120px;
        &.mozilla {
            max-width: 240px;
        }
    }
}
4 Likes

So i need to add it to my theme css ?

By the w8 after core update geting this

Yes, the best thing to do would be to create a theme component to hold all of your House Ad CSS then add it to your active themes.

4 Likes

Don’t we have a meta #howto for this @tshenry

4 Likes

We do now! WIP can be found here: House Ad Templates

4 Likes

Do you have an ad blocker installed in your browser? Are there any errors in the javascript console?

4 Likes

Not worked m8 still the same

thanx that helped … no im using brave broser so i tried from diferent browser …

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

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.

7 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?

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?

3 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.

2 Likes

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

1 Like

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

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…?

4 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.

4 Likes

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

4 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?

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.

1 Like