Submission redirect: tracking code in DOM event URL ?
-
Hello,
I would like to redirect anyone who submits our form to a URL with a tracking code generated by the form submitted.
We would like to redirect to a thank you page after someone submits one of our forms, and are doing this by adding to the relevant pages:
` <script>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
location = ‘www.ourwebsite.com/thankyou’;
}, false );
</script>`BUT I want it to also automatically add a tracking code so we can match each form submission to individual user journeys (and exclude from our reports any forms filled out which are not relevant).
Is there a tag or ID that contact form 7 generates which I can make the DOM event add to the end of our URL? I have tried ‘?=_serial_number’, but didn’t have any luck.
Many thanks,
Alice
- The topic ‘Submission redirect: tracking code in DOM event URL ?’ is closed to new replies.