Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Contact Form - Google Conversion Code Or Redirect Rate Topic   * * * * * 1 votes

 
  • philip.wap
  • Newbie
  • Members
  • Join Date: 09-Mar 16
  • 4 posts

Posted 10 March 2016 - 11:56 AM #1

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.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20786 posts

Posted 10 March 2016 - 03:19 PM #2

Try this code

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

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • philip.wap
  • Newbie
  • Members
  • Join Date: 09-Mar 16
  • 4 posts

Posted 11 March 2016 - 06:30 AM #3

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?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20786 posts

Posted 11 March 2016 - 08:43 AM #4

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • philip.wap
  • Newbie
  • Members
  • Join Date: 09-Mar 16
  • 4 posts

Posted 11 March 2016 - 10:34 AM #5

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20786 posts

Posted 11 March 2016 - 03:08 PM #6

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)


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • philip.wap
  • Newbie
  • Members
  • Join Date: 09-Mar 16
  • 4 posts

Posted 25 March 2016 - 11:39 PM #7

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?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20786 posts

Posted 28 March 2016 - 07:19 AM #8

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

 

 

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

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)