Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var phone = '{{event["new_value"]}}';
- phone = Array.from(phone.replace(/\D/g, ''));
- if (phone.length == 11) {
- phone[0] = '7';
- phone.splice(4, 0, ' ');
- phone.splice(1, 0, ' ');
- phone.unshift('+');
- phone = phone.join('');
- carrotquest.identify({'$phone': phone});
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement