Triggering Zapier on Thank you Page
Simply add the following snippet on your thank you page.
The following script will merge the query argument with the handl utm grabber cookies and trigger your webhook with all the data.
This is especially useful, when prospects redirected from webinar optin signup where the optin data appended to the thank you page URL as query arguments.
Don't forget to change the Zapier URL below with your own Webhook URL.
<script>
var qvars = {};
window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {qvars[key] = value;});
qvars = Object.assign(handl_utm,qvars)
setTimeout(function(){
var data = new URLSearchParams(qvars).toString()
console.log(data)
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", 'https://hooks.zapier.com/hooks/catch/5711357/b5af0ju/?'+data, false ); // false for synchronous request
xmlHttp.send( null );
}, 1000);
</script>