Install with JavaScript snippet

Install the JavaScript snippet into the head of your website.

Using the JavaScript script will provide a great level of flexibility on how you install Embedery into your website.

Embedery is designed to work with any type of website no matter how it has been built.

You can easily install the Embedery script using the script snippet below. Ideally you should install this script in the <head> of your webpage.

<script type="text/javascript">
  !function(window, document, undefined) {
    window._embedery = {};
    window._embedery.load = function(p, u){
      var o = document.createElement("script");
      o.type = "text/javascript", o.async = !0, o.crossorigin = "anonymous", o.src = "https://get.embedery.com/v1/js/" + p + ".js";
      var i = document.getElementsByTagName("script")[0];
      i.parentNode.insertBefore(o, i);
      window._embedery.user = u || {};
    }

    // load widget and define user
    window._embedery.load('ADD YOUR PROPERTY ID HERE', {
      //email: 'test@user.com', // Define user properties here,
      //firstName: 'Test' // they are optional but will provide a better understanding of who submitted what
    })
  }(window, document)

</script>

Ensure you replace 'ADD YOUR PROPERTY ID HERE' with your property ID.

Your property ID can be found in the URL of Embedery.com "https://embedery.com/a/PROPERTY_ID/widget/WIDGET_ID", in this case, "PROPERTY_ID" is the property URL.