Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1.  
  2. var phone = '{{event["new_value"]}}';
  3. phone = Array.from(phone.replace(/\D/g, ''));
  4. if (phone.length == 11) {
  5. phone[0] = '7';
  6. phone.splice(4, 0, ' ');
  7. phone.splice(1, 0, ' ');
  8. phone.unshift('+');
  9. phone = phone.join('');
  10. carrotquest.identify({'$phone': phone});
  11. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement