News:

Looking for documentation? Take a look on our wiki

Main Menu

add google code to the confirmation/thank you page

Started by ScottKR24, May 10, 2013, 18:01:08 PM

Previous topic - Next topic

ScottKR24

I need to add google tracking code to the confirmation/thank you page but have no idea where to find or look for it. Can someone please help. Also the confirmation/thank you page must stand apart from the order form, a separate URL.

Stonedfury

#1
The thank you page is order_done.php found the in cart folder. If you are using a template then /templates/yourtemplate/html/com_virtuemart/cart/order_done.php Just add echo 'yourscript';before the last
echo $this->html;


If you are NOT using a template then make an override folder so you wont lose this edit in the next update.

If you are using a marketing service and have seo on your site for the links. It should be something like www.yoursite.com/vmstore/cart/confirm I believe. I use a paypal purchase to check the pixels are firing on my thank you page and copy the url into your advertiser tracker.
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

ScottKR24

I looked here
components/com_virtuemart/views/cart
there's no order_done.php file.
Where else could it be?

Why is the thank you page not available from the admin area?

I found an order_done.php file in this dir
components/com_virtuemart/views/cart/tmpl
But there wasn't much in there code wise.

I looked here
templates/ja_mendozite/html
but there's no com_virtuemart dir.

Please help, thanks.

ScottKR24

Quote from: ScottKR24 on May 10, 2013, 21:04:20 PM
I looked here
components/com_virtuemart/views/cart
there's no order_done.php file.
Where else could it be?

Why is the thank you page not available from the admin area?

I found an order_done.php file in this dir
components/com_virtuemart/views/cart/tmpl
But there wasn't much in there code wise.

I looked here
templates/ja_mendozite/html
but there's no com_virtuemart dir.

Please help, thanks.

the order_done.php file I found in
components/com_virtuemart/views/cart/tmpl
I did this, is this right?

echo "<h3>".JText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU')."</h3>";

echo $this->html;

<!-- Google Code for Purchase Confirmation Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1062382850;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "sppmCIqryAQQgtrK-gM";
var google_conversion_value = 0;
/* ]]> */
</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/1062382850/?value=0&amp;label=sppmCIqryAQQgtrK-gM&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

Stonedfury

#4
Yes that's the right file But copy that file to your templates/yourtemplate/html/cart so it won't be over written.
Also put your code before the echo $this->html ; in its own echo. Example echo 'my script would be here';
echo $this->html;
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.