Magento Forum

Page 1 of 3
ADWORDS conversion tracking
 
btbc
Sr. Member
 
Total Posts:  95
Joined:  2008-06-11
 

ADWORDS conversion tracking is an awesome way to optimize advertising spending.

As of now, I know where to put the code for the CHECKOUT SUCCESS.

But, I would like to track conversion for a few other things. I’m not sure which files to add the rest of the codes.

1) User Registration - see if they were interested enough to create an acct
2) View Cart - see if they added to cart to check shipping, etc
3) Checkout - see if the member got to checkout and compare to checkout success… thus abandoned checkouts
4) Search - see if the member tried to search for something… might show that you don’t have what they need

PS: I would like to avoid modifying any core files. Changing template files would be best.

 
Magento Community Magento Community
Magento Community
Magento Community
 
btbc
Sr. Member
 
Total Posts:  95
Joined:  2008-06-11
 

Bump… anyone know?

I’m not sure, but I think this would help EVERYONE fine tune their advertising.

After a month or 10,000 clicks, you could determine how many people registered, viewed the cart, searched for items, or purchased something.

 
Magento Community Magento Community
Magento Community
Magento Community
 
btbc
Sr. Member
 
Total Posts:  95
Joined:  2008-06-11
 

Another bump?

Adwords conversion tracking has been great for me. I can at least see how many people make it to my homepage after clicking, and out of those people, how many buy.

Nobody else interested?

 
Magento Community Magento Community
Magento Community
Magento Community
 
xinmart.com
Jr. Member
 
Total Posts:  2
Joined:  2008-12-06
 

Sounds very good.

Can you let me know where did you add the google action code?

Thanks,
Mike,
www.xinmart.com

btbc - 13 November 2008 08:46 AM

ADWORDS conversion tracking is an awesome way to optimize advertising spending.

As of now, I know where to put the code for the CHECKOUT SUCCESS.

But, I would like to track conversion for a few other things. I’m not sure which files to add the rest of the codes.

1) User Registration - see if they were interested enough to create an acct
2) View Cart - see if they added to cart to check shipping, etc
3) Checkout - see if the member got to checkout and compare to checkout success… thus abandoned checkouts
4) Search - see if the member tried to search for something… might show that you don’t have what they need

PS: I would like to avoid modifying any core files. Changing template files would be best.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gregersen
Member
 
Total Posts:  57
Joined:  2008-06-15
 

Yeah, I would like to know too smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
lbrean
Member
 
Total Posts:  31
Joined:  2008-12-10
 

I’d agree with btbc that this kind of tracking is essential. Hopefully it makes it into a release, and not just for google adwords. Key occurrence pages (1-4, listed above) need to post variables that can be integrated with any third-party javascript tags.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mharirian
Jr. Member
 
Total Posts:  3
Joined:  2008-12-19
 

Hi,

I would like to know too. Plz let me know what you did?

Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
stengah
Member
 
Avatar
Total Posts:  42
Joined:  2008-07-17
Denmark
 

I second that - would be nice to have an overview of this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
widgetuk
Jr. Member
 
Total Posts:  20
Joined:  2008-10-09
 

Has anyone managed to work out which page to add the conversion tracking to for a standard sale in Magento??  The original poster, btbc, apparently figured this out, but didn’t offer up the information on his post, so could anyone else spare a minute or two and explain where the Google Snippet Code goes, and which values to put into Google Conversion Tracking during set up of a sale conversion?!

This would be a big help.

Thanks, Widgetuk.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kaijan
Jr. Member
 
Total Posts:  8
Joined:  2007-12-21
 

I believe you can add it here:

/var/www/store/app/design/frontend/YOURSITE/default/template/checkout/success.phtml

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anjanesh
Sr. Member
 
Avatar
Total Posts:  136
Joined:  2008-03-15
Mumbai, India
 

But how do we track each amount in the success page ?
In adwords there is an optional “Revenue for your action” field - but this differs for each product.

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

Surely someone by now must have worked out where to place what code to dynamically get the sales amount through to AdWords?! Anyone?!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pixxa
Sr. Member
 
Total Posts:  275
Joined:  2008-10-23
 

Im interested as well!

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

This should work, adapted from: http://www.idevkb.com/questions/6/Magento+Commerce combined with https://adwords.google.co.uk/support/bin/answer.py?answer=86277&cbid;=173qksre7xgzj&src;=cb&lev;=answer

In: app/design/frontent/default/your_template/template/checkout/success.phtml

Below:

<?php echo $this->__('Your order # is: %s'$this->getViewOrderUrl(), $this->getOrderId()) ?>.
<?php else :?>
<?php 
echo $this->__('Your order # is: %s'$this->getOrderId()) ?>.
<?php endif;?>

<?php 
//-------------------------------------------
// START ADWORDS CONVERSION VALUE TRACKING CODE
//-------------------------------------------
$order_details Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
$adwords_saleamt $order_details->subtotal
?>

<!-- Google Code for Purchase/Sale Conversion Page -->
<
script language="JavaScript" type="text/javascript">
<!--
var 
google_conversion_id XXXXXXXX---YOURIDHERE---XXXXXX;
var 
google_conversion_language "en";
var 
google_conversion_format "1";
var 
google_conversion_color "ffffff";
var 
google_conversion_label "purchase";
var 
google_conversion_value "<?php echo $adwords_saleamt; ?>";
//-->
</script>
<script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<
img height="1" width="1" border="0" src="http://www.googleadservices.com/pagead/conversion/XXXXXXXX---YOURIDHERE---XXXXXX/?label=purchase&amp;guid=ON&amp;script=0"/>
</
noscript>

<?php
//-------------------------------------------
// END ADWORDS CONVERSION VALUE TRACKING CODE
//-------------------------------------------
?>

I will test this over the next few days but it seems solid.

You may want to use https in all links.

 
Magento Community Magento Community
Magento Community
Magento Community
 
shopdoc
Jr. Member
 
Total Posts:  9
Joined:  2009-02-19
 

Thanks! This works fine and is usefull for affiliate tracking links as well.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ErotoToys
Jr. Member
 
Total Posts:  8
Joined:  2008-08-09
 

How do I grab the ORDER ID also?  I’d like to use the variable for shopping comparison engine code as well, but I need the Magento ORDER ID in order to properly track conversions.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3