Contributions
Google Adwords Conversion Value set to Order Total
This is a modification you make to the chekcout_success.php page to allow conversion tracking from your Google Adwords campaigns which will correctly set the value to the final order total including shipping and any coupons or discounts applied.
You will need to generate out the Google conversion script code and make changes to two places:
Change where it says:
ENTER_YOUR_GOOGLE_CONVERSION_ID_HERE*/
and
ENTER_YOUR_GOOGLE_CONVERSION_LABEL_HERE
Expand All / Collapse All
This is the correct file! Ignore the first one and use this.
The code you provided doesn't do what is advertised. It doesn't appear to do anything harmful. It just looks like the wrong page. No mention of google and what the heck is this bit towards the end?
<? //---PayPal WPP Modification START ---// ?>
<?php
if (tep_paypal_wpp_enabled()) {
if ($paypal_ec_temp) {
tep_session_unregister('customer_id');
tep_session_unregister('customer_default_address_id');
tep_session_unregister('customer_first_name');
tep_session_unregister('customer_country_id');
tep_session_unregister('customer_zone_id');
tep_session_unregister('comments');
//$cart->reset();
tep_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "'");
tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "'");
tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int)$customer_id . "'");
}
tep_session_unregister('paypal_ec_temp');
tep_session_unregister('paypal_ec_token');
tep_session_unregister('paypal_ec_payer_id');
tep_session_unregister('paypal_ec_payer_info');
}
?>
<? //---PayPal WPP Modification END ---// ?>
This is a modification you make to the chekcout_success.php page to allow conversion tracking from your Google Adwords campaigns which will correctly set the value to the final order total including shipping and any coupons or discounts applied.
You will need to generate out the Google conversion script code and make changes to two places:
Change where it says:
ENTER_YOUR_GOOGLE_CONVERSION_ID_HERE*/
and
ENTER_YOUR_GOOGLE_CONVERSION_LABEL_HERE
Note: Contributions are used at own risk.