Embedding Offers on Your Website as JS

Last Updated: Jun 17, 2015 05:40PM PDT

We now provide a quick and easy method for embedding offers within an external website, which you'll see under the Embed page of your offer dashboard (you can simply copy/paste the code given there into your website). Additionally, for reference, we've explained the process here.

Using the block of HTML/javascript below, you can embed this offer in any webpage, allowing users to interact with every aspect of the offer from inside an element of your choosing.

Follow the instructions to embed this offer on a webpage of your choosing:

Step 1) Insert the embed code for our Javascript SDK in the HTML of your webpage, preferably after the opening <body> tag:

<div id='woobox-root'></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//woobox.com/js/plugins/woo.js";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'woobox-sdk'));</script>

Step 2) Then place the embed element in the HTML of your webpage wherever you would like the offer to appear:

<div class='woobox-offer' data-offer='123abc'></div>

NOTE: The data-offer attribute is the unique offer URL shard, the last piece of the offer's shareable URL.

You're all set! The embed element resizes automatically to fill the width of whatever its containing element is (up to a max width of 810px), and the height will scale dynamically to fit the content of the offer.