Ability to _NOT_ show ads to anonymous visitors?

In the official House Ads plugin, would it be possible to add a “don’t show ads to anonymous visitors” preference?

Use case…

My community is set up that anyone can join/create-an-account. So I have a banner that encourages that, and Discourse itself does a great job with the “you seem to be enjoying…” prompts, like/reply leads to login/create-account, etc.

I’m using a house-ad to encourage people to subscribe. That puts them in specific discourse-group which grants them extra things.

So anonymous users are seeing both the “make a free account” and the upsell-house-ad. It would be better [in my opinion] if they were only offered one “next step”. Anonymous? we lead them to make a free account. Logged-in? they see the house-ad. (And of course if they’re in the group that the subscription plugin grants them, there’s no house-ad.)

1 Like

I haven’t looked to see just how to do it, but I think that the simple solution is to hide those with CSS. Just stick some css in your house ads to make it easy to hide them for anonymous users.

2 Likes

oh! How would I write a CSS selector for anonymous users?? (I’d never have thought to try that.)

1 Like

I don’t know well enough to tell you, but search for “Hide css anonymous” and you should get some hints.

2 Likes

You need to select html.anon in order to target anonymous users.

3 Likes
html.anon .discourse-adplugin {
    display: none;
}

…is such a simple solution.

I recant my idea for a needed feature :wink:

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.