Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.15 KB | None | 0 0
  1. <!-- 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 -->
  2. <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>
  3. <script>window.roistatCalltrackingScripts = [1];</script>
  4. <style>.roistat-lh-popup{opacity: 100 !important;}.roistat-lh-pulsator-phone{bottom: 20% !important;}</style>
  5. <script type="text/javascript">
  6. $(document).ready(function(){
  7. var roistatVisitCookie = getCookie('roistat_visit');
  8. $('.label_wrap .label_txt').attr("data-post-data",function(i) {
  9. var label= $(this).html();
  10. if (searchText('roistat', label)){
  11. $(this).parent().parent().parent().find(".field_wrap input").val(roistatVisitCookie);
  12. $(this).parent().parent().parent().find(".field_wrap textarea").val(roistatVisitCookie);
  13. $(this).parent().parent().parent().hide();
  14. }
  15. });
  16. function searchText( string, needle ) {
  17. return !!(string.search( needle ) + 1);
  18. }
  19. function getCookie(name) {
  20. var matches = document.cookie.match(new RegExp(
  21. "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
  22. ))
  23. return matches ? decodeURIComponent(matches[1]) : undefined
  24. }
  25. });
  26. </script>
  27. <script type="text/javascript">
  28. $(document).ready(function(){
  29. var utm_url =window.location.href + '';
  30. if (utm_url.indexOf("utm_source") > 0){
  31. var utm_source_buf = utm_url.split('utm_source=');
  32. if (utm_source_buf[1].indexOf("&;") > 0){
  33. var utm_source_buf2 = utm_source_buf[1].split('&;');
  34. var utm_source = utm_source_buf2[0];
  35. } else {var utm_source = utm_source_buf[1];}
  36. }
  37. if (utm_url.indexOf("utm_company_id") > 0){
  38. var utm_company_id_buf = utm_url.split('utm_company_id=');
  39. if (utm_company_id_buf[1].indexOf("&;") > 0){
  40. var utm_company_id_buf2 = utm_company_id_buf[1].split('&;');
  41. var utm_company_id = utm_company_id_buf2[0];
  42. } else {var utm_company_id = utm_company_id_buf[1];}
  43. if (utm_source=="direct"){utm_company_id = "Y" + utm_company_id;}
  44. if (utm_source=="yandex"){utm_company_id = "Y" + utm_company_id;}
  45. if (utm_source=="yandexpoisk"){utm_company_id = "Y" + utm_company_id;}
  46. if(utm_source=="adwords"){utm_company_id = "G" + utm_company_id;}
  47. }
  48. var submit_form_frm_lead = $('.frm_lead.form_new .user_form_submit button[type="submit"]').closest('.user_form_submit');
  49. 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>';
  50. submit_form_frm_lead.html(add_element+submit_form_frm_lead.html());
  51. $(document).on('click', '.frm_lead_new_submit', function () {
  52. var frm = $(this).closest('.frm_lead');
  53. var rep_h3 = frm.find('h3').html();
  54. if (rep_h3){
  55. var prod = rep_h3.replace("Заказать ", "");
  56. } else {
  57. var prod = "Форма без товара";
  58. }
  59.  
  60. if(frm.find('.fphone:first input:first').val()){
  61. var rep_comm = frm.find('.ftextarea:first textarea:first').val();
  62. if (rep_comm == ""){
  63. var rep_comm = "";
  64. }
  65. var roistatVisitCookie2 = getCookie('roistat_visit');
  66. var send_data = {
  67. name: frm.find('.fname:first input:first').val(),
  68. phone: frm.find('.fphone:first input:first').val(),
  69. email: frm.find('.femail:first input:first').val(),
  70. comment:document.location.host + " "+ rep_h3 + " " + rep_comm,
  71. textbox:frm.find('.ftextbox:first input:first').val(),
  72. utm_company: utm_company_id,
  73. roistatVisit:roistatVisitCookie2
  74. };
  75. $.ajax({
  76. url: 'http://kidkovrik.ru/sklad/lpwebhook.php',
  77. dataType: 'jsonp',
  78. data:send_data,
  79. jsonp: 'callback',
  80. jsonpCallback: 'jsonpCallback',
  81. success: function() {}
  82. });
  83. if (typeof yaCounter46293360 != 'undefined') {
  84. yaCounter46293360.reachGoal('zakaz');
  85. var num_order = 1;
  86. $.ajax({
  87. url: 'http://kidkovrik.ru/sklad/lp_num.php?callback=?',
  88. data: {},
  89. type: 'GET',
  90. crossDomain: true,
  91. dataType: 'jsonp',
  92. success: function(data) {
  93. num_order = data.request;
  94. dataLayer.push({
  95. "ecommerce": {
  96. "purchase": {
  97. "actionField": {
  98. "id" : num_order,
  99. "goal_id" : "34143579",
  100. },
  101. "products": [
  102. {
  103. "id": "LP-"+prod,
  104. "name": prod
  105. }
  106. ]
  107. }
  108. }
  109. });
  110. }
  111. });
  112. } else {
  113. var send_data = {
  114. name: frm.find('.fname:first input:first').val(),
  115. phone: frm.find('.fphone:first input:first').val(),
  116. email: frm.find('.femail:first input:first').val(),
  117. comment:document.location.host + " "+ frm.find('h3').html() + " " + frm.find('.ftextarea:first textarea:first').val(),
  118. textbox:frm.find('.ftextbox:first input:first').val(),
  119. roistatVisit:roistatVisitCookie2
  120. };
  121. $.ajax({
  122. url: 'http://kidkovrik.ru/sklad/lp_error.php',
  123. dataType: 'jsonp',
  124. data:send_data,
  125. jsonp: 'callback',
  126. jsonpCallback: 'jsonpCallback',
  127. success: function() {}
  128. });
  129. }
  130. if (typeof ga != 'undefined') {
  131. ga('send', 'event', 'form', 'zakaz');
  132. }
  133. frm.submit();
  134. } else {
  135. frm.find('.fphone span[title="Обязательное поле"]').addClass('ui_required');
  136. frm.find('.fphone input:first').addClass('ui_has_error');
  137. var error_msg = frm.find('.fphone .ui_error.hidden');
  138. error_msg.css("display", "block");
  139. error_msg.html("Это поле нужно заполнить");
  140. }
  141. });
  142. });
  143. </script>
  144.  
  145. <link href="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.css" rel="stylesheet">
  146. <script src="http://cdnjs.cloudflare.com/ajax/libs/fotorama/4.6.3/fotorama.js"></script>
  147.  
  148. <a href="#" class="scrollup">Scroll</a>
  149. <script type="text/javascript">
  150. $(document).ready(function(){
  151.  
  152. $(window).scroll(function(){
  153. if ($(this).scrollTop() > 100) {
  154. $('.scrollup').fadeIn();
  155. } else {
  156. $('.scrollup').fadeOut();
  157. }
  158. });
  159.  
  160. $('.scrollup').click(function(){
  161. $("html, body").animate({ scrollTop: 0 }, 600);
  162. return false;
  163. });
  164.  
  165. });
  166. </script>
  167.  
  168. <style>
  169. .scrollup{
  170. z-index: 100;
  171. width:64px;
  172. height:64px;
  173. opacity:0.5; /*Здесь можете менять значение от 0 до 1*/
  174. position:fixed;
  175. bottom:20px;
  176. right:20px;
  177. display:none;
  178. text-indent:-9999px;
  179. background: url(http://img0.liveinternet.ru/images/attach/c/7/124/950/124950334_5899697_3.png) no-repeat; /*Путь к картинке, на которую будут нажимать для подъема наверх страницы*/
  180. outline:0;
  181. }
  182. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement