Advertising Plugin for Discourse - Serve Ads on your Discourse Forum (Official Endorsed)

faq-material
official

(Ladydanger) #1

Hi :smile:,

There is now an officially endorsed advertising plugin ready for use. You can install it and start serving ads on your discourse forum.

It supports:

  • Google Adsense
  • DoubleClick for Publishers (DFP) (aka Google Ad Manager) including custom targeting
  • Amazon Affiliates - Product and Banner Ads.

You can download the officially endorsed Advertising plugin here and start serving ads to your Discourse forum.


Advertisement Space
Advertising Specifications - List / Plugin Request
How to ad banners?
Plugin for other than AdSense?
Customization in Discourse
Google AdSense plugin
AdSense plugin comparison
"Cannot load app" for a meta topic
Run custom ads?
Help with banner
Increasing DFP ad size on mobile
Upgrading Ember to 2.10
Any Thoughts on Supporting BSA or Alternative Advertising?
Monetized forum
Is there anybody being able to profit from a website based on discourse
Discourse Hosting - Digital Ocean vs Linode
(Neil Lalonde) #63

5 posts were split to a new topic: Ad Plugin ads showing too often


(Neil Lalonde) #87

I was able to get responsive ads in AdSense working on desktop. An example of a responsive ad that filled the width:

I’ll do mobile next. (For some reason the plugin hard-codes a size of 320x50 on mobile for all AdSense ads…)

But DFP… :cry:

Support for truly responsive ads doesn’t exist. You always needs to specify the size of ads in two places: your javascript via defineSlot, and in your DFP ad unit definitions. There are ways to kinda add support for responsive ads, but it means your javascript needs to define a list of all the ad sizes you want to allow at which viewport widths. Surely you should be able to set this list when you define the ad units in DFP, so I don’t understand why you need to define them again in your javascript…

So, the solution for DFP going forward is one of these:

  • Keep adding more values to the lists of ad sizes
  • Remove the lists and change the settings so you enter the arbitrary dimensions you want. (Not sure how to migrate existing DFP users to new settings…)

#89

Getting error: Failed to load resource: the server responded with a status of 400 ()

How to resolve this?


(Neil Lalonde) #91

400 Bad Request can indicate that your DFP publisher ID is wrong. In your DFP console, go to Admin > Global Settings > All network settings and find the number in “Network code”. Mine is 9 digits long.

Also it could mean the ad size that DFP is trying to serve is larger than the ad unit you’ve defined in your Discourse settings. DFP refuses to serve ads that will be cropped.


(Brock) #93

To do responsive properly with JS and defineSlot, can you please provide the following @neil? Thanks in advance!

  1. List of Discourse viewport widths
  2. List of ALL the different URLS where the ads can appear.
    For example, “dfp topic list top code desktop” & “dfp mobile topic list top code” appear at “/” and “/c” (from what I can tell but I’m 100% sure). We need this so we can create “zones” to map our tags in the JS properly.
  • dfp topic list top code
  • dfp mobile topic list top code
  • dfp topic above post stream code
  • dfp mobile topic above post stream code
  • dfp topic above suggested code
  • dfp mobile topic above suggested code
  • dfp post bottom code
  • dfp mobile post bottom code

(Neil Lalonde) #94

@Brock_Busby I think all the widths are in the main mixins.scss file.

All the urls is all the topic list pages. (e.g., /latest, /unread, etc.), and any topic page (/t/topic-slug/123).

I’m curious what you’re going to do to get it working. :thinking:


(Brock) #95

Appreciate it @neil ! We are going to attempt to do proper responsive using JS like on our regular site FTW.in.
I’ll come back once we try it out on our test server.


#96

Does it work with Native In-Feed and In-Article Ad blocks?

Status don’t change for Native type blocks…
image


(Neil Lalonde) #97

Status 400 (bad request) is coming from AdSense, and means you need to wait until Adsense approves your new ad units or has some ads to show. It’s hard to say why Adsense is rejecting the request.


(Neil Lalonde) #102

A post was split to a new topic: Using DFP to show house ads


(Stefano Maffulli) #118

this reply is a great resource, I wish I found this weeks ago. I’d suggest to create a #howto out of this, I’d be happy to contribute as I keep on learning DFP on my own.


(Anil Gupta) #129

Wow…this works.
Thanks @Steven and @pfaffman for the tips.


(Anil Gupta) #130

One more question:
Do we have any plans to support ‘In-feed’ ads?

These ads are basically meant to be shown WITHIN the post content and they really perform well than ads outside the post reading area.


(cpradio) #131

Do a search, there are feature requests and requests in #marketplace for them to be added, no one seems interested enough to do it though.


(Sebastian) #132

what’s the extent of amazon CPM support and what would the plugin author’s best practice suggestion be for what fall-back code to use? What are experiences with Amazon CPM and responsiveness?


(Anil Gupta) #144

Hi @cpradio
Not sure if you are interested in adsense customization on discourse, but, i wanted to share this update.

We no longer need to use the Discourse Adsense plugin to get ads inside the post!
The adsense AUTO ADS can do it in neat and pretty way.

See here:

This can be done using the Adsense Auto ads with just a single code that can be placed inside the theme customization head tag.
Google is using AI (artificial intelligence) to find the right point to display the ads automatically on any page on your website. No need to worry about type of placement of ads now.
Its all automatic!

Check this link for verifying the display of ads.


(Neil Lalonde) #145

That’s very cool Anil! I’ve been navigating around your site and eventually wasn’t seeing any ads in any topics. I wonder if AdSense is making that decision, or if there’s a problem with Auto Ads on single-page apps like Discourse.


#146

i just read more about this yesterday… it’ll be interesting to see how intelligent the placement really is…


(Anil Gupta) #147

Yes, i guess that could be a problem at this time.
I have been trying to test the pages and it looks like it loads ads on full page load only.

I will test it for couple of days on Discourse installation to see the AD metrics and then take a decision with respect to keeping it or move back to plugin.

On a side note, I have tested it on wordpress installation and AUTO ADS are indeed loaded separately on each new post there pretty well. The AD placement varies on each page though.
Sometimes, only 1 AD is shown and other times up-to 3 automatically at different places on the page.