window.addEventListener('action', function() { console.log('firing'); var $form = $('form'); var name = $form.find('[name=fullName]').val(); var email = $form.find('[name=email]').val(); analytics.track('Form Submitted', { form_field_email: email, form_field_name: name, label: 'Clean Water Sign Up', page_title: window.location.href, page_url: document.title, }); });