10

We have recently set up a magento community site running 1.9.0.1 having moved from go.

We are trying to set up the google adwords conversion tracking, there is a piece of code that they want placing on the success page.

Where is this located in 1.9.0.1?

2 Answers 2

8

As Step1:

you need to add conversion code on ordee success file

app/design/frontend/yourpackage/yourtemplate/template/checkout/success.phtml

if file no exits then:

copy success.phtml from

app/design/frontend/base/default/template/checkout/

and pasted

app/design/frontend/yourpackage/yourtemplate/template/checkout/

add your code on new success.phtml

in this file you can order id using below code

$this->getOrderId()

OR: check this extension http://www.magentocommerce.com/magento-connect/luka-google-adwords-conversion-tracking.html

3
  • The line var google_conversion_value = 1.00; in the google conversion code, does that not give all transactions a value of 1? Commented Aug 29, 2014 at 15:06
  • 1
    @PeterO'Sullivan Yes it does. You need to replace that with the transaction value. Commented Sep 22, 2016 at 21:20
  • GitHub link for Luka extension github.com/lukanetconsult/mage-google-adwords , works perfect.
    – FireBear
    Commented Nov 8, 2017 at 23:05
1

this is the code which worked for me

<?php
//Get Order Number & Order Total
$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
$amount = number_format($order->getGrandTotal(),2);

?>

and i got it from this link, maybe it helps someone aswell.

http://www.jxtgroup.com/how-to-setup-conversion-tracking-in-magento_3912881.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.