CodeFund Feature: Ad Callbacks

tl;dr: Publishers can grow with CodeFund without sacrificing revenue by using ad callbacks

Written by Eric Berry · 1 min read >

Building an ad platform can be tricky. Not only from a technical aspect but also regarding growth. It reminds me of the “which came first, the chicken or the egg” question.

Which came first?

In our case, the chicken would be the publisher, and the egg would be the advertiser. Publishers attract more advertisers, and advertisers attract more publishers.

Last year we decided to invest in ourselves and play the part of the advertiser when paying ads ran out. These internally paid ad campaigns helped ensure that we had enough funds to draw in more publishers. As well as this worked, it ended up costing us all of our profits. Did it work? Yes. Was it sustainable? Hell no.

In 2019, we decided to stop paying publishers to place fallback ads. This decision will allow us to realize a profit, which of course makes it so we can be around for the foreseeable future. However, this may come at a cost to some of our larger publishers because they may be displaying unpaid fallback ads.

Ad Callbacks

To resolve this concern, we have recently added callbacks into our funder script that can be subscribed to by the publisher.

Here’s the code that generates the funder script:

The lines to note here are 3, 11, 14, 18 and 21. We trigger a new event called ‘codefund’ which contains the status of the embed. If the status is ‘ok,’ then we know that an ad rendered successfully. If the status is ‘no-advertiser,’ we couldn’t find an advertiser for the given property and visitor.

So let’s say one of our publishers wants to use CodeFund as the first option for ads (this happens a lot because we pay publishers higher rates). Now they can put in place an event listener that will render an ad from another network if there are no paying CodeFund ads.

Here’s an example:

Now that this change is in place, our publishers can grow with us without sacrificing their revenue.

To learn more, view our documentation at https://github.com/gitcoinco/code_fund_ads#embed-callbacks


If you are interested in being a publisher with CodeFund, or advertising to our fantastic network of developers, visit https://codefund.app.

Written by Eric Berry
Co-founder of CodeFund.app and Gitcoin.co. I am passionate about helping OSS developers find funding. Profile

Introducing Global Pricing

Eric Berry in Advertising, Jobs
  ·   3 min read

Ad Effectiveness & Time of Day

Eric Berry in Advertising
  ·   1 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Share This