Adword Dynamic Conversion Tracking

Hi



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



{literal}







{/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

Good day,



Where did you place this code?

[quote name='eComLabs' timestamp='1417082204' post='198137']

Good day,



Where did you place this code?

[/quote]



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 tag



Thanks

S

[quote name=‘sap’ timestamp=‘1417090435’ post=‘198158’]

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 tag

[/quote]



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


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

Please try the following:


  1. Enable the add-on “My changes”;
  2. Create a file in [color=#262626][font=arial, sans-serif][size=3]\skins\basic\customer\addons\my_changes\hooks\checkout\order_confirmation.pre.tpl with the following code[/size][/font][/color]

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








<br />
[color=#262626][font=arial, sans-serif][size=3]Hope that help.[/size][/font][/color]<br />
<br />
<br />
[color=#262626][font=arial, sans-serif][size=3]Best regards, Alt-team.[/size][/font][/color]

[quote name=‘eComLabs’ timestamp=‘1417101540’ post=‘198179’]

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


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

```<br />
[/quote]<br />
<br />
Thanks eComs, but this did not work, appreciate you taking time though<br />
<br />
S

[quote name=‘Alt-team’ timestamp=‘1417179540’ post=‘198259’]

Please try the following:


  1. Enable the add-on “My changes”;
  2. Create a file in [color=#262626][font=arial, sans-serif][size=3]\skins\basic\customer\addons\my_changes\hooks\checkout\order_confirmation.pre.tpl with the following code[/size][/font][/color]

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








<br />
[color=#262626][font=arial, sans-serif][size=3]Hope that help.[/size][/font][/color]<br />
<br />
<br />
[color=#262626][font=arial, sans-serif][size=3]Best regards, Alt-team.[/size][/font][/color]<br />
[/quote]<br />
<br />
Hi Alt Team<br />
<br />
Thanks for this however there seems to be some error, can you please let me know one more time what should go under "[color=#000088][size=2]var[/size][/color][color=#000000][size=2] google_conversion_label"[/size][/color]<br />
<br />
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<br />
<br />
[color=#000000][size=2]Thanks[/size][/color]<br />
[color=#000000][size=2]S[/size][/color]

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

Sorry, there was a little misunderstanding.



Please clear the file that you created before.


  1. In the end of the file [color=#262626][font=arial, sans-serif][size=3]\skins\basic\customer\views\checkout\checkout.tpl add[/size][/font][/color]

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







[/size][/font][/color]

[color=#262626][font=arial, sans-serif][size=3] ```[/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.[/size][/font][/color]

[color=#262626][font=arial, sans-serif][size=3]Hope that it can help you.[/size][/font][/color]

[color=#262626][font=arial, sans-serif][size=3]Best regards, Alt-team.[/size][/font][/color]

[quote name=‘Alt-team’ timestamp=‘1417425941’ post=‘198434’]

Sorry, there was a little misunderstanding.



Please clear the file that you created before.


  1. In the end of the file [color=#262626][font=arial, sans-serif][size=3]\skins\basic\customer\views\checkout\checkout.tpl add[/size][/font][/color]

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







[/size][/font][/color]

[color=#262626][font=arial, sans-serif][size=3] ```[/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.[/size][/font][/color]

[color=#262626][font=arial, sans-serif][size=3]Hope that it can help you.[/size][/font][/color]

[color=#262626][font=arial, sans-serif][size=3]Best regards, Alt-team.[/size][/font][/color]
[/quote]
Thanks Alt Team, I will try this and update the result

Appreciate your time and help sincerely

S

worked like a charm…super happy



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



Thanks

S

Dear Sap,



You are welcome.



Best regards, Alt-team.

Sorry, there was a little misunderstanding.

Please clear the file that you created before.

1. In the end of the file [font=arial, sans-serif][size=3]\skins\basic\customer\views\checkout\checkout.tpl add[/size][/font]
[font=arial, sans-serif][size=3]



[/size][/font][/color]

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


[/size][/font]

[font=arial, sans-serif][size=3]conversion_id = 1234567890 Here please use your id. Check it in your google account.[/size][/font]

[font=arial, sans-serif][size=3]Hope that it can help you.[/size][/font]

[font=arial, sans-serif][size=3]Best regards, Alt-team.[/size][/font]

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!

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