Contact Form - Google Conversion Code Or Redirect

Good day

Please indicate how I can add Google Conversion Code after the user has submitted a contact form.

Alternatively, please indicate how I can redirect from:

/contact-us-en/?sent=Y

to my own custom page so that I can implement the conversion code on that page.

My ultimate goal is to add conversion code to track users that have submitted the contact form.

Thanks.

Try this code

{if $smarty.request.sent}
   ... Google code here ...
{/if}

Hi......I'm still getting used to CSCART......if you don't mind, please indicate where I apply that code. Is it in a hook? If so, which is the file and path?

You can update the following file:

design/themes/YOUR_THEME/templates/addons/form_builder/hooks/pages/page_content.override.tpl

It already have the necessary condition.

As alternative use the pages:form_sent hook from this file

But wouldn't that work with any form that is submitted? What if you want it to only apply for the contact form?

But wouldn't that work with any form that is submitted? What if you want it to only apply for the contact form?

In this case additional check is required:

{if $smarty.request.page_id = 123}
   ....
{/if}

where 123 - is ID of the page (can be found in the admin panel)

In this case additional check is required:

{if $smarty.request.page_id = 123}
   ....
{/if}

where 123 - is ID of the page (can be found in the admin panel)

Thanks a lot. I got it to work. Doing this made me realise though that if I add conversion code for just the contact form landing page, and then I submit the form, that conversion code loads again. So basically it's as though the contact-us conversion code runs twice and the contact-us completed code runs once (this is correct though thanks to your advise). How do I avoid the contact-us landing page converison code from running twice?

Please check where the hook is used there. Use the following condition:

{if $smarty.request.page_id = 123 && $smarty.request.sent == "Y"}
   ....
{/if}