Быстрое подключение
<script>
(function(w, d, s, h, id) {
w.roistatProjectId = id; w.roistatHost = h;
var p = d.location.protocol == "https:" ? "https://" : "http://";
var u = /^.*roistat_visit=[^;]+(.*)?$/.test(d.cookie) ? "/dist/module.js" : "/api/site/1.0/"+id+"/init";
var js = d.createElement(s); js.charset="UTF-8"; js.<$1> = 1; js.src = p+h+u; var js2 = d.getElementsByTagName(s)[0]; js2.parentNode.insertBefore(js, js2);
})(window, document, 'script', 'cloud.roistat.com', 'RRRRR');
</script>
<script>
window.roistatVisitCallback = function(visitId) {
document.cookie = 'yextrafield_roistat=' + visitId;
var script = document.createElement('script');
script.src = "https://wYYYYY.yclients.com/widgetJS";
document.getElementsByTagName('body')[0].appendChild(script);
};
</script>
<script>
window.onRoistatModuleLoaded = function () {
var params = window
.location
.search
.replace('?','')
.split('&')
.reduce(
function(p,e){
var a = e.split('=');
p[ decodeURIComponent(a[0])] = decodeURIComponent(a[1]);
return p;
},
{}
);
if (params['yextrafield_roistat']) {
window.roistat.setVisit(params['yextrafield_roistat']);
}
};
window.roistatVisitCallback = function (visitId) {
window.yclientsAdditionalOptions = {
bookingCustomFields: {
roistat: visitId
}
};
};
</script>
Согласие на обработку персональных данных и акцепт оферты