At Justuno, we try to keep things simple for web developers looking to embed our promo box, taking a page from modern JavaScript toolkits that separate markup and behavior. This way developers and non-developers alike can very easily manipulate the button and box far past how we've originally designed it.
Our API supports several types of configuration and customization. Below are some examples to get you started.
To hide the small promo button that activates the opening of the promo box you simply need to add this variable within the script tag portion:
var ju_hidebutton = true;
After hiding your promo button, you will need to make your own button somewhere on your page to open the promo box. To this you simply need to call the javascript function:
ju_loadiframe();
Example of text link..... Click for 15% off
<a href="Javascript:ju_loadiframe();">Click for 15% off</a>
Example of image link.....
<a href="Javascript:ju_loadiframe();"><img src="assets/navigation/example-15off-button.gif" width="96" height="75" alt="Justuno coupon"></a>
To auto open it on page load, just change your body tag to include the onload...
<body onload="ju_loadiframe();">
Note, you only want to add this to your homepage embed code or pages you would like to have the box automatically open.
You can forgo the javascript embed code entirely and place the promos in an iframe anywhere on your site. You will need to update the [your account id] portion in the example above to be your account id number. This can be found in the embed code portion:
<script type="text/javascript" charset="utf-8">var ju_num="[your account id]";var asset_host=(("https:"==document.location.protocol)?"https":"http")+'://s3.amazonaws.com/justuno/';(function(){function async_load(){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=asset_host+'coupon_code1.js';var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(window.attachEvent){window.attachEvent('onload',async_load);}else{window.addEventListener('load',async_load,false);}})();</script><a href="http://www.justuno.com" id="ju_123_seo" title="Get Facebook Likes">Get Facebook Likes</a>
Embedding the promo box as an iframe anywhere on your site with HTML
<iframe src='http://www.justuno.com/iframe-coupon.asp?ju_num=[your account id]' height='320' width='500' style='float:left; margin-right:20px;' frameborder='0'></iframe>
You will need to update the [your account id] portion in the example above to be your account id number.
This can be found in the embed code portion:
var ju_num = "D5B3D1C9-0386-41C8-A539-5032A8161813" ' in this example D5B3D1C9-0386-41C8-A539-5032A8161813 is your account id number
If you have an upgraded account, then you can use the custom iframe javascript and add this piece of code as a starting block for passing the email address entered to your own application. This is just a starting block, you would want to update the url it's submitted to at the very least:
function ju_email_capture(){
var bill_email = $('#field_share_email').val();
var req_email = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
if (req_email.test(bill_email) && bill_email!="") {
$.ajax({
url: 'http://www.yourdomain.com/your_email_capture_form.htm?em='+bill_email
});
}
}
$(document).ready(function(){
$('#field_share_email').blur(function(){
ju_email_capture();
});
});
| Name | Description | Type | Default value | Option Values |
|---|---|---|---|---|
| ju_hidebutton | When specified as true the promo button will not be rendered requiring you to use the JU_openpromobox() function to expand the promo box. | boolean | false | |
| ju_customvar | When specified will pass it's value to your Justuno widget so that you can use custom Justuno javascript to repass it back to your application after a user action | string | empty |
Click Here for platform integration steps