Ad tracking for Yahoo! Store

by Michael Whitaker on October 30, 2008

Using  search marketing ROI data as the basis for making smart business decisions (as I recommend you should) obviously requires that your conversion tracking is done properly. If you don't have the data you can't make decisions. Sounds like common sense, but it is not common practice from what I see.

If you run Yahoo! Search Marketing campaigns or Google Adwords campaigns, follow their respective instructions or wizards to grab the conversion tracking script and paste it in the Page Message field of the Order Confirmation tab of the checkout manager.

Checkoutmanager

This is a the good first step and most of you do that. However, out of the box, these scripts only count conversions, not revenue. Or you can specify a fixed average order value for all conversions, which is obviously not very accurate.

Here is a tip that every Yahoo! Store merchant can use right away to not only count conversions, but also grab the actual revenue amount for each order. It takes 5 seconds to implement and is easy to do.

A) For Yahoo! Search Marketing, your conversion script looks something like this. 


<SCRIPT language="JavaScript" type="text/javascript">
<!– Yahoo! Inc.
window.ysm_customData = new Object();
window.ysm_customData.conversion = "transId=,currency=,amount=";
var ysm_accountid = "1AEQN9C3347IVBPF2EAH4P8N2UC";
document.write("<SCR" + "IPT language='JavaScript' type='text/javascript' "
+ "SRC=//" + "srv2.wa.marketingsolutions.yahoo.com" + "/script/ScriptServlet" + "?aid=" + ysm_accountid
+ "></SCR" + "IPT>");
// –>
</SCRIPT>

Just make this simple change, highlighted for clarity:

<SCRIPT language="JavaScript" type="text/javascript">
<!– Yahoo! Inc.
window.ysm_customData = new Object();
window.ysm_customData.conversion = "transId=orderNum,currency=,amount=orderSubTotal";
var ysm_accountid = "1AEQN9C3347IVBPF2EAH4P8N2UC";
document.write("<SCR" + "IPT language='JavaScript' type='text/javascript' "
+ "SRC=//" + "srv2.wa.marketingsolutions.yahoo.com" + "/script/ScriptServlet" + "?aid=" + ysm_accountid
+ "></SCR" + "IPT>");
// –>
</SCRIPT>

B) For Google Adwords, the script looks something like this (this example assumes that you have specified a fixed conversion value of $20):

<!– Google Code for PURCHASE Conversion Page –>
<script language="JavaScript" type="text/javascript">
<!–
var google_conversion_id = 1234567890;
var google_conversion_language = "en_US";
var google_conversion_format = "1";
var google_conversion_color = "666666";
if (20.0) {
var google_conversion_value = 20.0;
}
var google_conversion_label = "PURCHASE";
//–>
</script>
<script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>


Just make this simple change, highlighted for clarity:

<!– Google Code for PURCHASE Conversion Page –>
<script language="JavaScript" type="text/javascript">
<!–
var google_conversion_id = 1234567890;
var google_conversion_language = "en_US";
var google_conversion_format = "1";
var google_conversion_color = "666666";
if (orderSubTotal) {
var google_conversion_value =
orderSubTotal;
}
var google_conversion_label = "PURCHASE";
//–>
</script>
<script language="JavaScript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>

That's it. These scripts will now use the actual revenue amount from each transaction.

If you use Adcenter, I am sure the change would be simple too. Also, instead of orderSubTotal, you could use orderTotal. I like orderSubTotal because it excludes shipping and tax, but you may prefer the total order amount.

And finally, since every Yahoo! Store uses the checkout manager it would be nice to have a simple wizard in YSM that gives you the enhanced conversion tracking script out of the box, but until then just follow these simple instructions.

Update on 10/05/2009

The value of the transaction is not shown by default in Adwords. In the reporting section you should create a new report and add Sales Conv. Value (many-per-click) in the Add or Remove Columns section:

Picture 109
(Click for larger version)

and then you can sort on the last column when the report is ready for viewing:

Picture 110
(Click for larger version)

  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter
  • FriendFeed
  • LinkedIn
  • PDF
  • Reddit

{ 12 comments… read them below or add one }

Robert January 9, 2009 at 9:23 am

Great post Michael.
Where does the conversion amount information show up in Google AdWords (or Google Analytics)?

Michael Whitaker January 9, 2009 at 9:33 am

In Adwords, when you create a report choose “Add/remove columns” and select from the “Conversions Column”, e.g the Sales Value, to display revenue amounts.
This post was only for Adwords and Yahoo! Search Marketing and not about Google Analytics. Tracking for Google Analytics and any other web analytics program is completely separate and independent. If you enable e-commerce tracking in Google Analytics and have your Adwords account integrated with your Google Analytics account, you should get the same type of information.

Mr Smith August 12, 2009 at 7:33 am

Thank you, this simple example was most helpful. Keep up the great work!

Andrew August 13, 2009 at 1:41 pm

Hey Micheal, I have a question, to setup conversion tracking, do i need to modify the add-to-cart button code on a yahoo! store?
It basically uses a form action code to submit details to the shopping cart and when the visitor is moved to the shopping cart, all campaign data is lost as it moves to a different domain (order.store.yahoo.net)
So basically i am unable to record the actual ROI for this. Please help!
Thanks!

Michael Whitaker August 14, 2009 at 9:33 am

Hi Andrew,
Conversion tracking scripts from Adwords, YSM and AdCenter write first party cookies that are then read as third party cookies on your conversion page. What this means is that it doesn’t matter that your checkout is on a different domain. The reporting in Adwords should give you conversion data as well as revenue data if you follow the tips in this post.

Luke October 5, 2009 at 2:20 pm

the adwords snippet doesn’t work like that – when I view source on my confirmation page it should replace that snipped with the subtotal, but it doesnt.
I think you need the php tags around it like adwords suggests…

Michael Whitaker October 5, 2009 at 3:33 pm

Hi Luke,
Many thanks for your comment. The example in this post were for a Yahoo! Store so maybe your platform is different and you can use PHP directly to display the SubTotal value. The Adwords script is JavaScript and using the JavaScript variable in the Yahoo! Store works very well.

Luke October 5, 2009 at 3:49 pm

Andrew,
Thanks for answering my question. I do have a yahoo store and I am trying to use this on the adwords conversion code.
If all you put is “orderSubTotal” – then when I view source on my confirmation page, it still shows “orderSubTotal” RATHER than have the actual order subtotal there – a number should appear there to transfer to adwords data.
I have also tried the sample which adwords suggests in a PDF manual I found:
if () {
google_conversion_value = ;
}
but it just turns out as jibberish on the confirmation page – example:
if (? echo $SubTotal ?) {
google_conversion_value = ? echo $SubTotal ?;
}
My understanding is that when you view source on the confirmation page, we should see the subtotal as a Number at that point, where we have typed “subtotal” in the code.
By the way, I just spoke with Yahoo and they said doing this is not possible…

Michael Whitaker October 5, 2009 at 4:01 pm

Sure, the source on the confirmation will still show var google_conversion_value = orderSubTotal; BUT on a live transaction, higher up on the page there is a Javascript array that has the actual value, e.g. orderSubTotal = 25; The Adwords code will then take the 25 value not the literal orderSubTotal.
Trust me – it works! Feel free to email me if you still have questions.
Michael

Luke October 5, 2009 at 4:10 pm

Michael,
I just noticed my code didn’t post right there – but no problem, I understand what your saying now. I am not a JavaScript expert, so I thought the number should then parse there – and then I also found that php tagged one a manual was suggesting.
This is a snippet of what shows at the top of the Yahoo Store Order Confirmation page (should be good reference for everyone else reading):
var orderSubTotal = ‘3.25′;
var orderTotal = ‘7.24′;
So, I guess I will watch my stats now and hope it pulls it! Thanks for the great tutorial.

Luke October 5, 2009 at 4:26 pm

Michael,
In order to view this data in adwords, I read in another post that you have to run a report and choose “Sales Conv. Value (many-per-click)”; is that correct?
Right now when I run a report with this value it just gives me numbers 1, 3, etc. – will these turn into dollar amounts now that I have the code?
Im sure others will find this info helpful too. Thanks!

Michael Whitaker October 5, 2009 at 4:49 pm

Thanks for the suggestion Luke. I have updated the post and have added instructions on how to see the transaction value in Adwords reporting.

Leave a Comment

Previous post:

Next post: