The below code can be added to your page under "Settings" -> "Integrations" -> "Site-wide scripts (head)" in order to trigger when a contact form or subscribe form is submitted successfully. This can be used to track events, conversions, or trigger some other external tool or script.
To track events for a subscribe form:
<script>
journoPortfolio.onSubscribeFormSuccess = function (block_id){
// your code here e.g. gtag('event', 'conversion', {})...
}
</script>
To track events for a contact form:
<script>
journoPortfolio.onContactFormSuccess = function (block_id){
// your code here e.g. gtag('event', 'conversion', {})...
}
</script>
These will run on every form submission.
To only run code for a certain form you can check the block id. For example:
<script>
journoPortfolio.onContactFormSuccess = function (block_id){
if(block_id == 20424){
// your code here e.g. gtag('event', 'conversion', {})...
}
}
</script>