Using JavaScript

The walker uses the elbLayer to handle all events. It is possible to also trigger custom events manually using JavaScript:

elbLayer.push(action, entity, data?, trigger?);

Both action and entity are strings and required. The data object holds all properties of an entity and is recommended to use. The trigger is optional and is expected to be a string.

When dealing with the elbLayer make sure to initialize it properly by writing one line before making use of the push method:

elbLayer = elbLayer || [];


Virtual page view of an overlay popup

elbLayer.push(‘view’, ‘page’, { id: ‘/overlay/login’, name: ‘Log In’ }, ‘visible’);

Add to cart

elbLayer.push(‘add’, ‘product’, { id: ‘sku’, name: ‘Shirt’ });

Click inside a wizzard to confirm a step

elbLayer.push(‘confirm’, ‘wizzard’, { id: ‘car’, name: ‘Custom Car’, version: 2 }, ‘click’);