What kind of trouble. This hook has worked flawlessly since its inception. Are you getting errors in your browser console? If so, what are they? If not, maybe you could describe your problem.
If you used the hook instead of putting your code in the main template then your changes would still be there after you upgraded. That's the whole point of using hooks; so your changes are preserved.
Works for me and countless others… Is the problem that the hook is not showing in the page source? Or is the problem that Google is not receiving/processing it properly?
Works for me and countless others… Is the problem that the hook is not showing in the page source? Or is the problem that Google is not receiving/processing it properly?
[/quote]
Honestly, no bloody idea. Starting to wonder where everything is going wrong.
The code doesn’t show in view source, and that’s half the problem, so placing fake orders gets old when actual works needs to be done.
Here’s my setup:
My Changes : Installed.
/design/themes/basic/templates/addons/my_changes/hooks/checkout/order_confirmation.post.tpl
```<br />
<br />
Contents:<br />
```php
<br />
<!-- Google Code for Google Adwords - Purchase Conversion Page --><br />
{literal} <br />
<script type="text/javascript"><br />
/* <![CDATA[ */<br />
var google_conversion_id = XXXXXXXXX;<br />
var google_conversion_language = "en";<br />
var google_conversion_format = "3";<br />
var google_conversion_color = "ffffff";<br />
var google_conversion_label = "Purchase";<br />
var google_conversion_value = {/literal}{$order_info.total}{literal};<br />
var google_conversion_currency = "AUD";<br />
var google_remarketing_only = false;<br />
/* ]]> */<br />
</script><br />
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"><br />
</script><br />
<br />
<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 />
{/literal}<br />
```<br />
<br />
If anything looks completely out of place, let me know, I'm getting old.
If you have cleared your cache after creating this order_confirmation.post.tpl file then you should in fact see your code (even if the code is wrong) in a view source of the checkout.complete page.
I do not see anything wrong with what you've posted.
Verify that the my_changes addon is “active” (it is disabled by default in V4) and verify that the cache is in fact clearing (I.e. you don't have ownership/permission problems on your site).
Does the theme directory need to be related to the theme which you're using? For example, I'm using a theme called Spark. Should I put it in the directory /design/themes/spark/…?
Honestly, no bloody idea. Starting to wonder where everything is going wrong.
The code doesn't show in view source, and that's half the problem, so placing fake orders gets old when actual works needs to be done.
If anything looks completely out of place, let me know, I'm getting old.
although I have the 'My changes' add-on activated, I do not see it when going to /design/themes/basic/templates/addons/ I can find the find the file in \yotpo\hooks\checkout and also \google_analytics\hooks\checkout Which (if any) should the AdWords code be placed?
Can somone please advise on how to have the google conversion code to work?
I am using buyshop theme
I have been placing it using a hook under /mydomain.com/design/themes/buyshop/templates/addons/my_changes/hooks/checkout as order_confirmation.post.tpl
google team was unable to help...they said the hook is not working...
If the hook is not being called, then you will have to contact the vendor of your theme to find out why. It would be very strange for a cs-cart theme vendor NOT to support the order_confirmation.post.tpl hook since that would break a ton of things.
What is the content of your order_confirmaiton.post.tpl file:
Enabling the Google Analytics addon and entering the appropriate credentials should be all you need for conversion code. You shouldn't have to add anything yourself. Are you sure you have your credentials set properly?