There are numerous parameters that can be used to customize eyezon to bring maximum value for your business.
There are three levels of customization available to you. We'll cover each of them here.
All parameters critical to the normal functioning of the service are accessible in your account. Please see Placing the button on your website for instructions.
However, if you want to use eyezon to its fullest, there are two more approaches you might want to consider.
init
function<script>
(function(w, d, s, o, f, js, fjs) {
w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
js = d.createElement(s); fjs = d.getElementsByTagName(s)[0];
js.id = o; js.src = f; js.async = true; fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', 'eyeZon', '<https://storage.googleapis.com/eyezonscriptv2/static/js/eyezonwidget.js>'));
eyeZon('init', {
businessId: '5ed8eb751f40454f41a32b40',
region: 'us-1'
});
</script>
In this example, businessID
и region
values are for demonstration purposes only.
In the example above, you can see the standard widget code. Everything that follows init
can be replaced by the extended code shown below:
eyeZon('init', {
businessId: '5e81cf421cb513002ed6f39e',
live: false,
position: 'BOTTOM_RIGHT',
language: 'ES',
fallbackLanguage: 'EN',
hideEyeAfterMinutes: 24 * 60,
hideInputIfPossible: false,
logging: false,
unclosable: false
});
businessId
is a unique ID of a client in the eyezon system. This parameter is used to set up buttonId
.
live
uses delegating the events to watch the dynamically added triggers. This means that if the widget has finished loading while the button is still loading, this button won't be able to initialize this widget. By default, this parameter is set to false
.
<aside> 💡 This parameter can be used if the widget needs to be launched by some other trigger rather than button. For example, it could be launched upon product page loading or opening product details.
</aside>
language
sets the widget language. If the parameter is not set, the value is taken from the lang
attribute from the opening <HTML>
tag of the page, and if not found, navigator.language
value from the customer's browser is used.
position
overrides the parameters for button placement on the page received from the server. Even if these parameters are set in the account, position
allows you to change its position, e.g. to make sure the button does not overlap with any elements on the page, or make its positioning uniform on all pages of the site, etc.
language
sets the widget language. If the parameter is not set, the value is taken from the lang
attribute from the opening <HTML>
tag of the page, and if not found, navigator.language
value from the customer's browser is used.
fallbacklanguage
: the language set by this parameter will be used if widget has not been localized into the language set in the previous parameter.
hideEyeAfterMinutes
sets the timeout before the widget icon disappears after all the notifications have been read. Its default value is 24 hours.