JavaScript API Setup

Our JavaScript library contains the functions required by our services. The library is loaded asynchronously and does not increase the loading time of your website.

It is compatible with pages served using both HTTP or HTTPS. The // before the path to the library is a protocol-independent absolute path, which detects whether your site uses HTTP or HTTPS. No modification of the code on secure pages is required.

You can place the JavaScript snippet anywhere in the HTML document. Our recommendation is to paste this code snippet into your website template page so that it appears before the closing </head> section.

<script type="text/javascript">

		/* Replace #your_subdomain# by the subdomain of a Site in your OneAll account */		 
		var oneall_subdomain = '#your_subdomain#';

		/* The library is loaded asynchronously */ 
		var oa = document.createElement('script');
		oa.type = 'text/javascript'; oa.async = true;
		oa.src = '//' + oneall_subdomain + '';
		var s = document.getElementsByTagName('script')[0];
		s.parentNode.insertBefore(oa, s);

User Contributed Notes