Getting started
Main script
The main script should be added at the head tag between script html tag. This javascript code is responsible for enabling widgets on partner page.
(function (w,d,s,o,f,js,fjs) {
w['arlab-site-widgets']=o;w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
if (d.getElementById(o)) return;
js = d.createElement(s), fjs = d.getElementsByTagName(s)[0];
js.id = o; js.src = f; js.async = 1; fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', 'arlab', 'https://connect.ar-labs.io/v2/widget.js'));
Initial method
To initiate connection between website and api init method must be used with api key. Widgets configuration will be downloaded
after the partner’s positive verification. Also in this method developer can send custom parameters for additional widgets’ configuration.
arlab('init', {apiKey:'xxxxx partner api key xxxxx', language: 'en'});
Simple implementation
Simple implementation requires using of the floatqr method and selecting an appropriately defined skin.
arlab('floatqr', {skin:'default'});
Advanced implementation
Advanced implementation requires using of the qrcode method and specifying in the parameters the place append where the widget is to be placed as well as the dimension size of the generated code.
arlab('qrcode', {append: '#qr_holder', 'size': 50});