Advertisement
Dzhubal

Untitled

Aug 14th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function dataCollection() {
  2.     if ($) {
  3.         clearInterval(checkJQuery);
  4.         $(document).on('change', 'input[data-tilda-rule="phone"]', function() {
  5.             carrotquest.identify([{op: 'update_or_create', key: '$phone', value: $(this).val()}]);
  6.         });
  7.         $(document).on('change', 'input[data-tilda-rule="email"]', function() {
  8.             carrotquest.identify([{op: 'update_or_create', key: '$email', value: $(this).val()}]);
  9.         });
  10.         $(document).on('change', 'input[data-tilda-rule="name"]', function() {
  11.             carrotquest.identify([{op: 'update_or_create', key: '$name', value: $(this).val()}]);
  12.         });
  13.         window.carrotEventFunc = function ($form) {
  14.             carrotquest.track('Название события при отправке формы')
  15.         };
  16.         $('form#form104047819').each(function () {
  17.             $(this).data('success-callback', 'window.carrotEventFunc');
  18.         });
  19.     };
  20. };
  21. var checkJQuery = setInterval(dataCollection, 500);
  22. setTimeout(function() {
  23.     clearInterval(checkJQuery);
  24. }, 5000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement