P
perpixon
- Original Poster
- #1
Hi,
I am having trouble in getting the Google Adwords conversion tracking working. Looking on magento help forum pages I have found the following code:
<?php
$order_details = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
$adwords_saleamt = $order_details->subtotal;
?>
Which needs to be added at the end of the success page, followed by the block of code Google give you.
The problem I have is when I add the above code the success page only half loads (I get the order number etc. but it dosnt display anything below the continue shopping button i.e. no footer).
I can just add the Google block of code on its own and the page works correctly but im not sure if it is actually reporting back to google. I have tried to make a fake transaction from the add but it is not appering in the conversion results.
What does the first bit of code do and do I need it?
Google Code
<!-- Google Code for Purchase Success Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = xxxxxxxxx;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "07tpCxxxxxxxx2b_gM";
var google_conversion_value = 0;
var google_remarketing_only = false;
/* ]]> */
</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/10699xxxxxx4/?value=0&label=07tpCLLxxxxxxxM2b_gM&guid=ON&script=0"/>
</div>
</noscript>
I am having trouble in getting the Google Adwords conversion tracking working. Looking on magento help forum pages I have found the following code:
<?php
$order_details = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
$adwords_saleamt = $order_details->subtotal;
?>
Which needs to be added at the end of the success page, followed by the block of code Google give you.
The problem I have is when I add the above code the success page only half loads (I get the order number etc. but it dosnt display anything below the continue shopping button i.e. no footer).
I can just add the Google block of code on its own and the page works correctly but im not sure if it is actually reporting back to google. I have tried to make a fake transaction from the add but it is not appering in the conversion results.
What does the first bit of code do and do I need it?
Google Code
<!-- Google Code for Purchase Success Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = xxxxxxxxx;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "07tpCxxxxxxxx2b_gM";
var google_conversion_value = 0;
var google_remarketing_only = false;
/* ]]> */
</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/10699xxxxxx4/?value=0&label=07tpCLLxxxxxxxM2b_gM&guid=ON&script=0"/>
</div>
</noscript>