Jump to content

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

Adword Dynamic Conversion Tracking Rate Topic   - - - - -

 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 27 November 2014 - 09:29 AM #1

Hi

I am trying to set up adwords dynamic conversion tracking on the checkout page with the below code

{literal}
<!-- Google Code for checkout page cart Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1234567890;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXXXXXXXXXX";
if (<? echo $_total ?>) {
var google_conversion_value = <? echo $_total ?>
}
var google_conversion_currency = "USD";
var google_remarketing_only = false;
/* ]]> */
</script><script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script><noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/123456789/?value=<? echo $_total ?>&amp;currency_code=USD&amp;label=XXXXXXXXXXXX&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
{/literal}

This is not working. The variable that captures the total value of the cart at checkout is $_total. My version is 2.2.4 Pro

Please help me get the code right

Thanks
S

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

Posted 27 November 2014 - 09:56 AM #2

Good day,

Where did you place this code?
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)

 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 27 November 2014 - 12:13 PM #3

Good day,

Where did you place this code?


I placed it through Design->Blocks->Checkout Page and create a block to paste the code there. When I go to checkout page and view source then I can see this code there before </body> tag

Thanks
S

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

Posted 27 November 2014 - 03:19 PM #4

I placed it through Design->Blocks->Checkout Page and create a block to paste the code there. When I go to checkout page and view source then I can see this code there before </body> tag


I am not sure, if blocks in 2.x version support Smarty code, but try the following code:

<!-- Google Code for checkout page cart Conversion Page -->
<script type="text/javascript">
<![CDATA[
var google_conversion_id = 1234567890;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXXXXXXXXXX";
{if $smarty.session.cart.total}
var google_conversion_value = '{$smarty.session.cart.total}';
{/if}
var google_conversion_currency = "USD";
var google_remarketing_only = false;
]]>
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/123456789/?value={$smarty.session.cart.total}&amp;currency_code=USD&amp;label=XXXXXXXXXXXX&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

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)

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2720 posts

Posted 28 November 2014 - 12:59 PM #5

Please try the following:

1. Enable the add-on "My changes";
2. Create a file in \skins\basic\customer\addons\my_changes\hooks\checkout\order_confirmation.pre.tpl with the following code
<!-- Google Code for checkout page cart Conversion Page -->
<script type="text/javascript">
<![CDATA[
var google_conversion_id = '{$order_info.order_id}';
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "Order №{$order_info.order_id} is plased. Total: {$order_info.total}";
var google_conversion_value = '{$order_info.total}';
var google_conversion_currency = "USD";
var google_remarketing_only = false;
]]>
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/{$order_info.order_id}/?value={$order_info.total}&amp;currency_code=USD&amp;label=Order №{$order_info.order_id} is plaсed. Total: {$order_info.total}&amp;guid=ON&amp;script=0"/>
</div>
</noscript>


Hope that help.


Best regards, Alt-team.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 29 November 2014 - 01:51 AM #6

I am not sure, if blocks in 2.x version support Smarty code, but try the following code:

<!-- Google Code for checkout page cart Conversion Page -->
<script type="text/javascript">
<![CDATA[
var google_conversion_id = 1234567890;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXXXXXXXXXX";
{if $smarty.session.cart.total}
var google_conversion_value = '{$smarty.session.cart.total[/size][size=4]}';
{/if}
var google_conversion_currency = "USD";
var google_remarketing_only = false;
]]>
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/123456789/?value={$smarty.session.cart.total}&amp;currency_code=USD&amp;label=XXXXXXXXXXXX&amp;guid=ON&amp;script=0"/>
</div>
</noscript>


Thanks eComs, but this did not work, appreciate you taking time though

S

 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 29 November 2014 - 01:52 AM #7

Please try the following:

1. Enable the add-on "My changes";
2. Create a file in \skins\basic\customer\addons\my_changes\hooks\checkout\order_confirmation.pre.tpl with the following code

<!-- Google Code for checkout page cart Conversion Page -->
<script type="text/javascript">
<![CDATA[
var google_conversion_id = '{$order_info.order_id}';
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "Order №{$order_info.order_id} is plased. Total: {$order_info.total}";
var google_conversion_value = '{$order_info.total}';
var google_conversion_currency = "USD";
var google_remarketing_only = false;
]]>
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/{$order_info.order_id}/?value={$order_info.total}&amp;currency_code=USD&amp;label=Order №{$order_info.order_id} is plaсed. Total: {$order_info.total}&amp;guid=ON&amp;script=0"/>
</div>
</noscript>


Hope that help.


Best regards, Alt-team.


Hi Alt Team

Thanks for this however there seems to be some error, can you please let me know one more time what should go under "var google_conversion_label"

Also I am trying to capture this on the checkout page and not on the order thank you page - I hope I was clear in my post

Thanks
S

 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 29 November 2014 - 03:22 AM #8

Hi Alt Team

Appreciate your advice however when I place the file in the location as specified by you (I presumed the skin is the directory of my current skin and not basic) - the code does not show up on the checkout page view source at all

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2720 posts

Posted 01 December 2014 - 09:25 AM #9

Sorry, there was a little misunderstanding.

Please clear the file that you created before.

1. In the end of the file \skins\basic\customer\views\checkout\checkout.tpl add
<!-- Google Code for checkout page cart Conversion Page -->
<script type="text/javascript">
//<![CDATA[
var google_conversion_id = 1234567890;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "Checkout";
{if $cart.total}
var google_conversion_value = "{$cart.total}";
{/if}
var google_conversion_currency = "USD";
var google_remarketing_only = false;
//]]>
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/123456789/?value={$cart.total}&amp;currency_code=USD&amp;label=Checkout&amp;guid=ON&amp;script=0"/>
</div>
</noscript>[/size][/font][/color]
 
[color=#262626][font=arial, sans-serif][size=3]


conversion_id = 1234567890 Here please use your id. Check it in your google account.

Hope that it can help you.

Best regards, Alt-team.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 02 December 2014 - 01:08 PM #10

Sorry, there was a little misunderstanding.

Please clear the file that you created before.

1. In the end of the file \skins\basic\customer\views\checkout\checkout.tpl add

<!-- Google Code for checkout page cart Conversion Page -->
<script type="text/javascript">
//<![CDATA[
var google_conversion_id = 1234567890;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "Checkout";
{if $cart.total}
var google_conversion_value = "{$cart.total}";
{/if}
var google_conversion_currency = "USD";
var google_remarketing_only = false;
//]]>
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/123456789/?value={$cart.total}&amp;currency_code=USD&amp;label=Checkout&amp;guid=ON&amp;script=0"/>
</div>
</noscript>[/size][/font][/color]

[color=#262626][font=arial, sans-serif][size=3]


conversion_id = 1234567890 Here please use your id. Check it in your google account.

Hope that it can help you.

Best regards, Alt-team.

Thanks Alt Team, I will try this and update the result

Appreciate your time and help sincerely

S

 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 02 December 2014 - 01:25 PM #11

worked like a charm...super happy

I have been struggling with this for several days and your advice just worked like magic

Thanks
S

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2720 posts

Posted 02 December 2014 - 02:30 PM #12

Dear Sap,

You are welcome.

Best regards, Alt-team.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • Bob53207
  • Newbie
  • Trial users
  • Join Date: 10-Mar 16
  • 2 posts

Posted 10 March 2016 - 03:12 PM #13

Sorry, there was a little misunderstanding.

Please clear the file that you created before.

1. In the end of the file \skins\basic\customer\views\checkout\checkout.tpl add

<!-- Google Code for checkout page cart Conversion Page -->
<script type="text/javascript">
//<![CDATA[
var google_conversion_id = 1234567890;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "Checkout";
{if $cart.total}
var google_conversion_value = "{$cart.total}";
{/if}
var google_conversion_currency = "USD";
var google_remarketing_only = false;
//]]>
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script><noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/123456789/?value={$cart.total}&amp;currency_code=USD&amp;label=Checkout&amp;guid=ON&amp;script=0"/>
</div>
</noscript>[/size][/font][/color]
 
[color=#262626][font=arial, sans-serif][size=3]


conversion_id = 1234567890 Here please use your id. Check it in your google account.

Hope that it can help you.

Best regards, Alt-team.

 

My client is using v. 4.2.4  Where would I find the path to place the code?  Does it still look like what you have posted?  Thanks!



 
  • crazyshark20
  • Junior Member
  • Members
  • Join Date: 19-Aug 09
  • 311 posts

Posted 31 August 2016 - 10:10 AM #14

design/themes/responsive/templates/views/checkout/checkout.tpl