Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Yandex.Metrika counter --> <script type="text/javascript" > (function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter46293360 = new Ya.Metrika({ id:46293360, clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true, ecommerce:"dataLayer" }); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks"); </script> <noscript><div><img src="https://mc.yandex.ru/watch/46293360" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <!-- /Yandex.Metrika counter -->
- <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.async = 1; js.src = p+h+u; var js2 = d.getElementsByTagName(s)[0]; js2.parentNode.insertBefore(js, js2);})(window, document, 'script', 'cloud.roistat.com', '92f7f35d059a5372ce4625337a2f41a8');</script>
- <script>window.roistatCalltrackingScripts = [1];</script>
- <style>.roistat-lh-popup{opacity: 100 !important;}.roistat-lh-pulsator-phone{bottom: 20% !important;}</style>
- <script type="text/javascript">
- $(document).ready(function(){
- var roistatVisitCookie = getCookie('roistat_visit');
- $('.label_wrap .label_txt').attr("data-post-data",function(i) {
- var label= $(this).html();
- if (searchText('roistat', label)){
- $(this).parent().parent().parent().find(".field_wrap input").val(roistatVisitCookie);
- $(this).parent().parent().parent().find(".field_wrap textarea").val(roistatVisitCookie);
- $(this).parent().parent().parent().hide();
- }
- });
- function searchText( string, needle ) {
- return !!(string.search( needle ) + 1);
- }
- function getCookie(name) {
- var matches = document.cookie.match(new RegExp(
- "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
- ))
- return matches ? decodeURIComponent(matches[1]) : undefined
- }
- });
- </script>
- <script type="text/javascript">
- $(document).ready(function(){
- var utm_url =window.location.href + '';
- if (utm_url.indexOf("utm_source") > 0){
- var utm_source_buf = utm_url.split('utm_source=');
- if (utm_source_buf[1].indexOf("&;") > 0){
- var utm_source_buf2 = utm_source_buf[1].split('&;');
- var utm_source = utm_source_buf2[0];
- } else {var utm_source = utm_source_buf[1];}
- }
- if (utm_url.indexOf("utm_company_id") > 0){
- var utm_company_id_buf = utm_url.split('utm_company_id=');
- if (utm_company_id_buf[1].indexOf("&;") > 0){
- var utm_company_id_buf2 = utm_company_id_buf[1].split('&;');
- var utm_company_id = utm_company_id_buf2[0];
- } else {var utm_company_id = utm_company_id_buf[1];}
- if (utm_source=="direct"){utm_company_id = "Y" + utm_company_id;}
- if (utm_source=="yandex"){utm_company_id = "Y" + utm_company_id;}
- if (utm_source=="yandexpoisk"){utm_company_id = "Y" + utm_company_id;}
- if(utm_source=="adwords"){utm_company_id = "G" + utm_company_id;}
- }
- var submit_form_frm_lead = $('.frm_lead.form_new .user_form_submit button[type="submit"]').closest('.user_form_submit');
- var add_element = '<div class="frm_lead_new_submit" style="width:350px;height:50px;z-index:1000;position: absolute;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); -moz-opacity: 0; -khtml-opacity: 0; opacity: 0;cursor: pointer;"></div>';
- submit_form_frm_lead.html(add_element+submit_form_frm_lead.html());
- $(document).on('click', '.frm_lead_new_submit', function () {
- var frm = $(this).closest('.frm_lead');
- var rep_h3 = frm.find('h3').html();
- if (rep_h3){
- var prod = rep_h3.replace("Заказать ", "");
- } else {
- var prod = "Форма без товара";
- }
- if(frm.find('.fphone:first input:first').val()){
- var rep_comm = frm.find('.ftextarea:first textarea:first').val();
- if (rep_comm == ""){
- var rep_comm = "";
- }
- var roistatVisitCookie2 = getCookie('roistat_visit');
- var send_data = {
- name: frm.find('.fname:first input:first').val(),
- phone: frm.find('.fphone:first input:first').val(),
- email: frm.find('.femail:first input:first').val(),
- comment:document.location.host + " "+ rep_h3 + " " + rep_comm,
- textbox:frm.find('.ftextbox:first input:first').val(),
- utm_company: utm_company_id,
- roistatVisit:roistatVisitCookie2
- };
- $.ajax({
- url: 'http://kidkovrik.ru/sklad/lpwebhook.php',
- dataType: 'jsonp',
- data:send_data,
- jsonp: 'callback',
- jsonpCallback: 'jsonpCallback',
- success: function() {}
- });
- if (typeof yaCounter46293360 != 'undefined') {
- yaCounter46293360.reachGoal('zakaz');
- var num_order = 1;
- $.ajax({
- url: 'http://kidkovrik.ru/sklad/lp_num.php?callback=?',
- data: {},
- type: 'GET',
- crossDomain: true,
- dataType: 'jsonp',
- success: function(data) {
- num_order = data.request;
- dataLayer.push({
- "ecommerce": {
- "purchase": {
- "actionField": {
- "id" : num_order,
- "goal_id" : "34143579",
- },
- "products": [
- {
- "id": "LP-"+prod,
- "name": prod
- }
- ]
- }
- }
- });
- }
- });
- } else {
- var send_data = {
- name: frm.find('.fname:first input:first').val(),
- phone: frm.find('.fphone:first input:first').val(),
- email: frm.find('.femail:first input:first').val(),
- comment:document.location.host + " "+ frm.find('h3').html() + " " + frm.find('.ftextarea:first textarea:first').val(),
- textbox:frm.find('.ftextbox:first input:first').val(),
- roistatVisit:roistatVisitCookie2
- };
- $.ajax({
- url: 'http://kidkovrik.ru/sklad/lp_error.php',
- dataType: 'jsonp',
- data:send_data,
- jsonp: 'callback',
- jsonpCallback: 'jsonpCallback',
- success: function() {}
- });
- }
- if (typeof ga != 'undefined') {
- ga('send', 'event', 'form', 'zakaz');
- }
- frm.submit();
- } else {
- frm.find('.fphone span[title="Обязательное поле"]').addClass('ui_required');
- frm.find('.fphone input:first').addClass('ui_has_error');
- var error_msg = frm.find('.fphone .ui_error.hidden');
- error_msg.css("display", "block");
- error_msg.html("Это поле нужно заполнить");
- }
- });
- });
- </script>
- <link href="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.css" rel="stylesheet">
- <script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.js"></script>
- <a href="#" class="scrollup">Scroll</a>
- <script type="text/javascript">
- $(document).ready(function(){
- $(window).scroll(function(){
- if ($(this).scrollTop() > 100) {
- $('.scrollup').fadeIn();
- } else {
- $('.scrollup').fadeOut();
- }
- });
- $('.scrollup').click(function(){
- $("html, body").animate({ scrollTop: 0 }, 600);
- return false;
- });
- });
- </script>
- <style>
- .scrollup{
- z-index: 100;
- width:64px;
- height:64px;
- opacity:0.5; /*Здесь можете менять значение от 0 до 1*/
- position:fixed;
- bottom:20px;
- right:20px;
- display:none;
- text-indent:-9999px;
- background: url(http://img0.liveinternet.ru/images/attach/c/7/124/950/124950334_5899697_3.png) no-repeat; /*Путь к картинке, на которую будут нажимать для подъема наверх страницы*/
- outline:0;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement