So you are a coder

Developer Support

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.

Hiding promo Button & Opening it with JS

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:

/* Make sure to replace the campaign_id below with your campaign ID found on the manage campaign page. */

ju_loadiframe({
	'campaign_id':345
});

Example of text link..... Click for 15% off

<a href="Javascript:ju_loadiframe();">Click for 15% off</a>

Example of image link.....

Justuno coupon
<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.

Embedding the promo box as an iframe anywhere on your site with Javascript

This will display the promotional offer inline somewhere on your page vs the default hovered popup. This script will load an iframe into the element on your page you have designated at page load. Make sure to replace the #elementid portion in this sample code with your html element you would like to load it in. For example, if you have <div id="mycontainer"></div> then you would use var ju_loadwindow = '#mycontainer'; any jquery selector will work here.

<script type="text/javascript" charset="utf-8">
var ju_loadwindow = '#elementid';
function ju_init(){
	ju_loadiframe()
}
</script>

How to provide custom values for use with targeting rules

Place these three optional javascript variables somewhere before your Justuno embed code and assign them whatever values so you can use them in your targeting rules.

var ju_custom1 = 99.99 // this could be the current shopping cart total for the customer
var ju_custom2 = "logged in" // this say whether the user is logged in or not
var ju_custom3 = "true" // this could be true or false if the user is a repeat buyer

UI Configuration Options

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  
ju_custom1 Any custom value you want to assign for use with targeting rules string or number empty  
ju_custom2 Any custom value you want to assign for use with targeting rules string or number empty  
ju_custom3 Any custom value you want to assign for use with targeting rules string or number empty  

Popular Shopping Cart Integration Steps

Click Here for platform integration steps