Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (location.pathname=='/ru/webinars') {
- document.addEventListener('click', function(e) {
- if (e.target.matches('.contacts_main_form .contacts_main_form_btn, .contacts_main_form .contacts_main_form_btn *')) {
- var form = document.querySelector('.contacts_main_form'),
- name = form.querySelector('input[name="name"]').value,
- email = form.querySelector('input[name="email"]').value,
- phone = form.querySelector('input[name="phone"]').value,
- job = form.querySelector('input[name="occupation"]').value,
- company = form.querySelector('input[name="company"]').value;
- if (name!='' && email!='' && phone!='' && job!='' && company!='') {
- carrotquest.track('Заполнил форму вебинара', {
- 'Имя вебинара': 'Visual Trends 2020',
- 'form_id': 'stdSiteEventEventreg1s'
- });
- carrotquest.identify([
- {op: 'update_or_create', key: '$name', value: name},
- {op: 'update_or_create', key: '$email', value: email},
- {op: 'update_or_create', key: '$phone', value: phone},
- {op: 'update_or_create', key: 'Должность', value: job},
- {op: 'update_or_create', key: 'Компания', value: company},
- {op: "append", "key": "Зарегистрирован на вебинар", "value": "Visual Trends 2020"},
- {op: 'update_or_create', key: 'Соглашение принято', value: true}
- ]);
- };
- };
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement