How to setup Celery Affiliate Program
Celery is a platform for pre-orders, crowdfund and beyond. Emerged from Y Combinator in 2012, Celery is totally free until you start charging orders. Celery has a one goal: to help you sell your great ideas, better. Celery provides the tools to pre-sell and crowdfund independently. This helps thousands of people to launch their way.
Steps
Step 1 - Landing Page
Add following code before </body> in your landing page (i.e index.html or landing.html) if required
<script>
var sd = 'YOUR-OSI-URL';
var resource = document.createElement('script');
resource.src = "YOUR-OSI-URL/track.js";
var script = document.getElementsByTagName('script')[0];
script.parentNode.insertBefore(resource, script);
</script>
Change ‘YOUR-OSI-URL’ with your OSI URL.
Step 2 - Sale tracking
Log in to your Celery and navigate to Settings -> Checkout -> Confirmation page -> Custom scripts and add following code.
<script>
var order = App.getOrder({version: 'v1'});
var transaction = order.number;
var amount = order.total / 100;
</script>
<script async>
function hideIF() {
document.getElementById('IF').style.visibility = '';
}
function getSaleInfo() {
document.getElementById('st_code').style.visibility = 'hidden';
document.getElementById('st_code').innerHTML='<iframe src="YOUR-OSI-URL/sales/salejs/amount:' + amount + '/transaction:' + transaction + '" alt="" id=IF width=50 height=50 border="0" frameborder="0" onload="hideIF()">';
}
window.onload = getSaleInfo;
</script>
<div id="st_code"></div>
Change ‘YOUR-OSI-URL’ with your OSI URL.