Splitting your Coil profits with Charities

Coil profits and Charities

Monetizing content is vital for the future of content creators. Many content creators have given up on projects that were sound and important, due to the lack of monetization. The Coil universe is opening up for this, bringing even more creativity into the world.

Coil is not disrupting the ad industry, but rather complementing and reviving an old and great idea: Direct payment from consumer to content creator.

During the last couple of days I have been testing and making experiments. One of the more interesting things I came across is the splitting of Coil profits.
Imagine if you (as a content creator) could split the incoming Coil stream between yourself and a Charity?

In my case I have chosen StJude to be my secondary Coil receiver for a while. Maybe I will choose another Charity later on as my secondary receiver. You can change receivers as much as you like.

An important thing to know here is that in order to implement this code, you do NOT need to be a paying Coil subscriber! The only ones who need a paid Coil subscription are the ones who are visiting your Coil enabled website or content. So as a content creator, wanting to include e.g. StJude as your secondary receiver, just go ahead and do it without a paid Coil subscription. The only thing you need is an XRPtipbot account to use as your Payment Pointer (which you already have, if you have a Twitter profile).

Code to place in header

<script src="https://polyfill.webmonetization.org/polyfill.js"></script>
<script src="https://cdn.coil.com/donate.js"></script>
   paymentPointer: '$twitter.xrptipbot.com/research_omega'
   paymentPointer: '$twitter.xrptipbot.com/stjude',
  addCoilAdvert: true

Replace the payment pointers marked Red, in the above code. The first one with your own pointer and the second one with a Charity pointer e.g. Stjude.

Testing and observations

I am testing this in the Chrome browser. If you would like to test if it works you can inspect your Chrome DevTools Elements panel, by right clicking and pressing "Inspect" on the Coil element

Then you wil be able to see the counters (Both Counters) running

The first counter in the top is your own and the second one is the counter for StJude.

Observation A: As far as I have experienced, the split is not exactly 50% all the time, there are small differences runtime, e.g. sometimes StJude gets more, sometimes you get more, but the difference is not that big and I guess it will even out in the long run. I will do some further testing on it later on,

Observation B: You can duplicate the code part

   paymentPointer: '$twitter.xrptipbot.com/stjude'

as many times as you want, splitting the profits even further. If you want to split it 3 ways, giving approximately 33% to each, just duplicate to 3 pointers! I am not sure where the limit is for splitting but it works fine with 2 pointers.

Observation C: A new feature has been added to the Coil code, the "addCoilAdvert: true" shows an ad for Coil if a visitor do no have a Coil subscription when they visit your Coil enabled webpage. It will look like this for non-coil subscribers:

Any Coil subscribers will not see the text "Support this site with Coil", instead the Coil subscriber will see the Coil counter.

Happy Coding!

Using Coil to hide or add content for Coil subscribers

EDIT: I have had to update the code in order for it to work on all mobile devices also.

The following javascript code works both for http/https on Chrome desktop with Coil Extension AND on Chrome mobile with the Coil handler.

It works both for normal webpages and for Apps. It is very easy to implement in a webpage. Implementing it in apps, requires a Webview.

 It also works in an Webview (because Android use Chrome as Webbrowser in Webview) so that Android Developers can benefit from Coil. Yes, this means that an app developer can throw away the ads and implement Coil instead!

At the time of writing this blog, there are not many Coil subscribers, so let's make the following approach: Let's monetize both on the non Coil subscribers (with an XRP tip button + maybe some ads), and also monetize on the Coil subscribers, by letting them donate to us (but removing the XRP tip button for the subscribing visitors, in order to give them a more clean, smooth and ad free experience).

Imagine that we would like to show an XRP tip button for the people who are not Coil subscribers and hide the XRP tip button for those who are subscriber. What I am trying to demonstrate with the following code is that we can be specifically nice to Coil subscribers when they visit our content.

Content creators do appreciate getting paid for the work they create, while balancing a good User eXperience with monetization. There are many ways to implement these monetization models, one of them is being nice to subscribers, another is to be bad to non-subscribers.

If you haven't enabled the Coil Header script yet, please do it by using this guide:


before proceeding with the rest of this tutorial.

Changing html

Add the following Div element to your code where you want to.

<div id='div_btn_tip'>
<a amount="1" size="200" to="research_omega" network="twitter" href="https://www.xrptipbot.com" target="_blank"></a>
<script async src="https://www.xrptipbot.com/static/donate/tipper.js" charset="utf-8"></script>

Remember to replace the red part in the above code to your own Twitterhandle

Add the script to discover if it's a Coil subscriber visiting

Add the following code

<script src="https://polyfill.webmonetization.org/polyfill.js"></script>

<script src="https://cdn.coil.com/donate.js"></script>



   paymentPointer: '$twitter.xrptipbot.com/research_omega',
   addCoilAdvert: true


<script type='text/javascript'>
  document.addEventListener(&quot;DOMContentLoaded&quot;, function(event) {

      if (document.getElementById("wm-coil-donate-widget")) {
       document.getElementById(&#39;div_btn_tip&#39;).style.display = &#39;none&#39;;
    }, 15000);



Replace the payment pointers marked Red, in the above code. 

In the above code we are looking for the "div" element with ID="wm-coil-donate-widget" that is created when Coil is enabled with the content.  If the element exist (i.e Coil is enabled) we can act accordingly.

What happens here is that the code checks after 15 seconds if Coil is enabled. If it is, then we go into Coil enabled mode. 

So What did we just do?

This is what a Coil subscriber will see

+ maybe some Coil "Premium" Content reserved only for Coil subscribers.

This is what a NON Coil subscriber will see

+ maybe a lot of annoying popup ads.

In this example I want to show the XRP tip button for people who are not Coil subscribers, and not show the XRP tip button for those who are Coil subscribers (because they are already monetizing your content, so no need to tip).  A better example would have been to show an ad instead of the tip button, but by now I think you get the idea of how we dynamically can remove/show content based on whether it is a Coil subscriber visiting or not.

What else can it be used for

By tweaking the above mentioned code a litte bit, you can choose to show ads for NON-coil subscribers and NOT show ads for Coil subscribers.

There are 3 obvious ways to get paid from your users or visitors:
  1. ads
  2. XRP Tipbot button
  3. Coil enabling your app/webpage/blog/video/browsergame etc.
You can mix the 3 ways as you wish, ensuring that regardless of your user having a Coil subscription or not, you will get paid e.g. if the user doesn't have a Coil subscription, then you show ads. And if they have a Coil subscription you use the above code to strip the ads (runtime).

Happy coding :-)

Alice, Bob and Charlie in a Coil context

Use Cases

Alice is a first mover, an early adopter. Alice likes information and staying ahead so she consumes a lot of web content and apps. She has a flatrate $5 per month Coil subscription. No matter how much Alice donates through Coil, she will only pay $5 per month, for as long as she wishes. Even if Alice donates $20 during the month, she only pays $5 to Coil, which means her donating costs never exceeds $5

Bob is a blogger and he is an app developer. Bob has implemented Coil code into both his app and on his blog following this guide: Enabling Coil for content creators
Bob has implemented Coil in his content, in a way so that when a visitor with an active Coil subscription visits his blog, the visitor do not see any ads on the blog or app. When a visitor without a Coil subscription visits his blog or uses his app, that visitor will see ads. Bob has used this guide to hide ads from Coil subscribing visitors: Hide ads

Charlie is a freeloader. Charlie loves information and apps, but he doesn't want to pay anything for access to it. Charlie thinks everything on the internet should be for free and that content creators should just do their job.

What do each of them see

Alice sees a clean blog and she has an ad free app experience. It doesn't matter if Alice use her smartphone or her desktop computer. Everything for her is ad free on Bob's blog
"Blog of Bob"
"content... content... content"
"Premium content..."

(Alice sees a small counter in the bottom showing that she is donating to the content)

Bob sees this on his XRPtipbot account:

Charlie sees this on Bob's blog

"Blog of Bob"

aaaand a couple of pop-ups


What kind of content creator do you want to be?

XRP using Coil with Blogger

Using Coil with Blogger is an easy task

Visit https://www.blogger.com and open your own blog using your Google account.

There are 2 ways to implement this. By placing the code in the header tag of the HTML or by adding a Gadget.

Coil recommends placing it in the header and it is generally considered best practice to place scripts in the HTML header. First I will show the recommended way.

You can insert the code above the HTML /head tag

1. Go to Theme and Edit HTML

2. Place the following code just above the /head tag by editing (Edit HTML) the Theme you are using for your site

&lt;script src=&quot;https://polyfill.webmonetization.org/polyfill.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://cdn.coil.com/donate.js&quot;&gt;&lt;/script&gt;
paymentPointer: &quot;$twitter.xrptipbot.com/research_omega&quot;,
addCoilAdvert: true

Or use this nonencoded code instead:

<script src="https://polyfill.webmonetization.org/polyfill.js"></script>
<script src="https://cdn.coil.com/donate.js"></script>
   paymentPointer: '$twitter.xrptipbot.com/research_omega',
   addCoilAdvert: true

You need of course to insert your own Payment Pointer. by replacing $twitter.xrptipbot.com/research_omega in the above code, with your own e.g.  $twitter.xrptipbot.com/YOURTWITTERHANDLE

3. Press Save Theme

If you are not comfortable using the above mentioned method, you can use a Gadget instead, as explained below.

You can use a Gadget 

The Gadget places the script/code in the Body tag, which is not best practice.

1. Go to your Layout
2. Add a Gadget (HTML/Javascript)

3. Paste this code (@XRPtrump gave it to the XRPcommunity. Thx Doc)

<script src="https://polyfill.webmonetization.org/polyfill.js"></script>
<script src="https://cdn.coil.com/donate.js"></script>
   paymentPointer: "$twitter.xrptipbot.com/YOURTWITTERHANDLE"

Remember to replace the twitterhandle $twitter.xrptipbot.com/research_omega to your own twitterhandle.

When you are done

Verify on fudbingo.com/coilchecker

Remember to register your Twitter handle on Coil and download their browser plugin

Get your XRP :-)

Now for those of you who prefer WordPress here is a tutorial for you: Chris_DMLab Wordpress plugin

My Coil experience (first day)

So I got Coil set up on my blog yesterday.

I am no pro blogger, actually far from it, this is my first blog ever. The closest thing I have ever come to a blog, is as a consumer (my favorite one being the blog Hodor7777 makes).

Coil vs Ads

Personally I have nothing against ads. If I consume someone else's work for free I expect ads to be thrown in my face, but still, I don't really like the idea of plastering external stuff into my apps or content.
The thought of "tampering" with the life-cycle of the User Experience, "POP-UP here is an ad!" is not for me. 

Coil Experience 2018

 My blog is now Coil enabled. It felt really good to enable monetization on the blog. I actually had not created any content on my blog before I Coil enabled it. I am really into XRP and researching the #InternetOfValue, so I thought, why not blog about what I like the most?

I created a basic tutorial for enabling Coil on blogger.com, you can read the blog entry here:


After it got Coil enabled I was thinking "ok, let's see what comes of it". Today I looked at my https://www.xrptipbot.com and I kind of just stared for a few minutes on the numbers...


"What??!" I just got paid for some basic content, that I had only used 25 minutes creating. I couldn't believe it. Furthermore the payment was made instantly in my favorite digital asset, XRP. 

There is also a secondary bonus of using Coil with the xrptipbot, Payment Pointer. I get to see some data about when my blog is being read by Coil activated accounts. 

Furthermore I get a sum of the ILP/Coil payments

 That is a really nice feature @WietseWind 

If you are interested in seeing who just enabled their content, go to this checker

Personally, I am not blogging primarily to receive XRP. I would like to blog more about e.g. the eco-system surrounding it, market mechanisms etc. because I actually like it, but one thing that motivated me, is this: I get paid. Ok. So I get to do what I like the most (create something and following /researching XRP) plus I also get paid for it, in XRP! I hope that you will consider taking up your long lost forgotten or even entirely new projects again, knowing that there is a monetization model ready to back it up.

That was my first experience with Coil and my first experience in getting paid for something that is not on a Job contract. So far I cannot think of any drawbacks in using Coil. Who knows what I might create next... All I know is that it will be Coil enabled.