<script>
if (document.readyState !== 'loading') {
us_clickInterception();
} else {
document.addEventListener('DOMContentLoaded', us_clickInterception);
}
function us_clickInterception() {
var links = document.querySelectorAll('a');
Array.prototype.forEach.call(links, function (link) {
link.addEventListener('click', function () {
/* write action type */
});
});
}
</script>
<script>
if (document.readyState !== 'loading') {
us_clickInterceptionInBlock();
} else {
document.addEventListener('DOMContentLoaded', us_clickInterceptionInBlock);
}
function us_clickInterceptionInBlock() {
var links = document.querySelectorAll('#rec123456789 a');
Array.prototype.forEach.call(links, function (link) {
link.addEventListener('click', function () {
/* write action type */
});
});
}
</script>
<script>
$(document).ready(function () {
$("[href='#rec123456789']").click(function () {
yaCounterXXXXXX.reachGoal('CLICK1');
});
$("[href='http://help-ru.tilda.ws/']").click(function () {
yaCounterXXXXXX.reachGoal('CLICK2');
});
});
</script>
<script>
if (document.readyState !== 'loading') {
us_sendGoogleAnalytics();
} else {
document.addEventListener('DOMContentLoaded', us_sendGoogleAnalytics);
}
function us_sendGoogleAnalytics() {
var links = document.querySelectorAll('a');
Array.prototype.forEach.call(links, function (link) {
link.addEventListener('click', function (e) {
if (link.href && link.href.indexOf('URL Value') !== -1) {
e.preventDefault();
ga('send', {
'hitType': 'pageview',
'page': '/click' + window.location.pathname,
'title': 'Virtual page name',
});
setTimeout(function () {
window.location = link.href;
}, 200);
}
});
});
}
</script>
<script>
function mySuccessFunction(form) {
if (!form) return;
if (form instanceof jQuery) {
form = form.get(0);
}
/* Lead ID */
var leadId = form.tildaTranId;
var orderId = form.tildaOrderId;
/* fields in the lead */
var obj = {};
var inputs = form.elements;
Array.prototype.forEach.call(inputs, function (input) {
obj[input.name] = input.value;
});
/*
to address to field value use:
obj["Name"]
obj["Phone"]
obj["Email"]
etc.
*/
}
if (document.readyState !== 'loading') {
us_sendFormAfterSuccess();
} else {
document.addEventListener('DOMContentLoaded', us_sendFormAfterSuccess);
}
function us_sendFormAfterSuccess() {
var forms = document.querySelectorAll('.js-form-proccess');
Array.prototype.forEach.call(forms, function (form) {
form.addEventListener('tildaform:aftersuccess', function () {
mySuccessFunction(form);
});
});
}
</script>
<script>
window.myAfterSendedFunction = function (form) {
if (!form) return;
if (form instanceof jQuery) {
form = form.get(0);
}
/* Lead ID */
var leadId = form.tildaTranId;
var orderId = form.tildaOrderId;
/* fields in the lead */
var obj = {};
var inputs = form.elements;
Array.prototype.forEach.call(inputs, function (input) {
obj[input.name] = input.value;
});
/* here you should write a data sending code to the destination, e.g. data receiving to your script or data adding in cookie */
};
if (document.readyState !== 'loading') {
us_eventFromCartToPayment();
} else {
document.addEventListener('DOMContentLoaded', us_eventFromCartToPayment);
}
function us_eventFromCartToPayment() {
var forms = document.querySelectorAll('.js-form-proccess');
Array.prototype.forEach.call(forms, function (form) {
form.addEventListener('tildaform:aftersuccess', function () {
window.myAfterSendedFunction(form);
});
});
}
</script>
<script>
if (document.readyState !== 'loading') {
us_customDOMChanges();
} else {
document.addEventListener('DOMContentLoaded', us_customDOMChanges);
}
function us_customDOMChanges() {
var buttons = document.querySelectorAll('.t-btn');
Array.prototype.forEach.call(buttons, function (button) {
/* add custom class to buttons */
button.classList.add('superclass');
});
/* add service script */
var service = document.createElement('script');
service.src = 'https://superservice.com/script.js';
service.type = 'text/javascript';
service.charset = 'UTF-8';
document.documentElement.appendChild(service);
}
</script>
<script>
$(document).ready(function () {
var widget = $('<a href="https://clck.yandex.ru/redir/dtype=stred/pid=7/cid=1228/*https://pogoda.yandex.ru/213" target="_blank"><img src="//info.weather.yandex.net/213/1_white.ru.png?domain=ru" border="0" alt="Яндекс.Погода"/><img width="1" height="1" src="https://clck.yandex.ru/click/dtype=stred/pid=7/cid=1227/*https://img.yandex.ru/i/pix.gif" alt="" border="0"/></a>');
widget.attr('style', 'display: block;left: 50%;margin-left: 20%;position: absolute;top: 100px;');
$('#rec123456789').append(widget);
});
</script>
<script>
if (document.readyState !== 'loading') {
us_initAdaptiveWidget();
} else {
document.addEventListener('DOMContentLoaded', us_initAdaptiveWidget);
}
function us_initAdaptiveWidget() {
if (window.isMobile == true) {
/* code for mobile devices */
} else {
/* code for desktop devices */
}
}
</script>
<div id="widgetbox" style="text-align: center;">
<div class="left" id="_bn_widget_"><a href="http://bnovo.ru/" id="_bnovo_link_" target="_blank">Bnovo</a></div>
<script type="text/javascript" src="http://widget.bnovo.ru/v2/js/bnovo.js"></script>
</div>
<script>
if (document.readyState !== 'loading') {
us_appendMixedWidget();
} else {
document.addEventListener('DOMContentLoaded', us_appendMixedWidget);
}
function us_appendMixedWidget() {
var html = '';
if (window.isMobile == true) {
/* code for mobile devices */
html = '<script>';
html += 'Bnovo_Widget.init(function(){Bnovo_Widget.open("_bn_widget_", {type: "vertical",lcode: "1234567890",lang: "ru",width: "230",background: "#ffda4a",bg_alpha: "100",padding: "18",font_type: "arial",font_color: "#222222",font_size: "16",title_color: "#222222",title_size: "18",inp_color: "#222222",inp_bordhover: "#3796e5",inp_bordcolor: "#cccccc",inp_alpha: "100",btn_background: "#f8f8f8",btn_background_over: "#ffffff",btn_textcolor: "#222222",btn_textover: "#222222",btn_bordcolor: "#cccccc",btn_bordhover: "#cccccc"});});';
html += '</script' + '>';
} else {
/* code for desktop devices */
html = '<script>' +
'Bnovo_Widget.init(function(){Bnovo_Widget.open("_bn_widget_", {type: "horizontal",lcode: "1234567890",lang: "ru",width: "960",background: "#ffda4a",bg_alpha: "100",padding: "20",font_type: "arial",font_color: "#222222",font_size: "16",title_color: "#222222",title_size: "18",inp_color: "#222222",inp_bordhover: "#3796e5",inp_bordcolor: "#cccccc",inp_alpha: "100",btn_background: "#f8f8f8",btn_background_over: "#ffffff",btn_textcolor: "#222222",btn_textover: "#222222",btn_bordcolor: "#cccccc",btn_bordhover: "#cccccc"});});' +
'</script' + '>';
}
var widgetBox = document.querySelector('#widgetbox');
if (widgetBox) widgetBox.insertAdjacentHTML('beforeend', html);
}
</script>
<style>
/* Replace rec00000000 with Zero block ID */
#rec00000000 {
width: 100%;
position: fixed;
top: 0;
z-index: 9998;
}
</style>
<script>
function t396_onSuccess(form) {
if (!form) return;
if (form instanceof jQuery) {
form = form.get(0);
}
/* Lead ID */
var leadId = form.tildaTranId;
var orderId = form.tildaOrderId;
/* all lead fields */
var obj = {};
var inputs = form.elements;
Array.prototype.forEach.call(inputs, function (input) {
obj[input.name] = input.value;
});
/* Send data via POST-request */
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://yourwebhook.ru/form.php');
xhr.send(JSON.stringify(obj));
xhr.onload = function () {
if (xhr.response) {
/* Actions if data was received successfully */
/* Redirection to the success page */
var successUrl = form.getAttribute('data-success-url');
if (successUrl) window.location.href = successUrl;
}
};
}
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var allRec = document.getElementById('allrecords');
if (allRec) allRec.setAttribute('data-fb-event', 'nosend');
});
</script>