Using JavaScript
The walker uses the elbLayer to handle all events. It is possible to also trigger custom events manually using JavaScript:
1
elbLayer.push("entity action", data?, trigger?);
Copied!
Both entity and action are combined in one string, separated by space 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:
1
elbLayer = elbLayer || [];
Copied!

Examples

Virtual page view of an overlay popup

1
elbLayer.push('page view', { id: '/overlay/login', name: 'Log In' }, 'visible');
Copied!

Add to cart

1
elbLayer.push('product add', { id: 'sku', name: 'Shirt' });
Copied!

Click inside a wizzard to confirm a step

1
elbLayer.push('wizzard confirm', { id: 'car', name: 'Custom Car', version: 2 }, 'click');
Copied!
Last modified 2mo ago