- 1). Locate the file in your Magneto store's online directory, replace "exampleskin" with the name of the skin you are using and open it in an HTML editor:
/app/design/frontend/default/exampleskin/template/checkout/success.phtml - 2). Place the following lines of code at the very bottom of the PHTML file:
<?php
$order_details = Mage: :getModel('sales/order')->loadByIncrementId(Mage: :getSingleton('checkout/session')->getLastRealOrderId());
$adwords_saleamt = $order_details->subtotal;
?> - 3). Save the PHTML file and then close the HTML editor.
- 4). Log in to your Google AdWords account, then navigate to the "Reporting" tab. Click on the link named "Conversions" and follow the automated steps that you need to obtain Google conversion tracking javascript code for the PHTML file.
- 5). Paste the Javascript generated by Google AdWords into your PHTML document, save the document again and upload it to the Magneto online store's server to see the changes in your production environment.
previous post
next post