简体   繁体   中英

Track.form snippet from segment.io cancels redirect of the form

After form submission, it has to redirect to another page:

$("#formId").signUp({ APIUrl : 'https://website.com/api/register_user', redirectUrl : 'staging' });

But, after I install track.form snippet in the footer, redirect is not working and page with form just reloads.

var form = $('#formId'); analytics.trackForm(form, 'Signed Up Spanish', { email: document.email });

See question and answer from Tim Macchi at https://forum.webflow.com/t/segment-trackform-interferes-with-form-behavior/67474

<script type="text/javascript">
  $( ".as-form" ).submit(function( event ) {
    analytics.track('as masterclass signup', {
    }); 
  });
</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM