Google AdWords and the “new” Yahoo! checkout, “Wow, that was easy!”

Trying to get the “real value” of a sale from a Yahoo! store, and then pass it to the Google AdWords code used to be a nightmare! To be more honest, getting just about anything made by Google to work with anything made by Yahoo! was typically a challenge.

Thus, I felt getting the new cart to work with AdWords would be a time consuming chore. Not only was I wrong, I was wrong enough to have time to write this post!

Anyway, the good stuff:
In the new Yahoo! store checkout, the order confirmation page comes complete with a set of javascript variables loaded up with info about that order. Namely:

var orderSubTotal = '129.95';
var orderTotal = '169.27';
var orderNum = 'foo-143';
var numOfItems = '1';
var items = new Array('1510 Carry-on case - FAA carry on approved for airlines');
var ids = new Array('15caonca');
var codes = new Array('1510');
var qtys = new Array('1');
var price = new Array('129.95');

There is some setup required on the AdWords side: When you create your tracking code, you want to use the “Advanced option: conversion value” By default, the “Value” box will display “USD $1.” You’ll want to change the number 1 to either the “orderSubTotal” or “orderTotal” depending on whether or not you want sales tax and shipping included in your total. In this case, we’ll use “orderSubTotal.” Also make sure that your “security level” is set to “https://”

Google AdWords tracking code setup for a Yahoo! Store

Hit the “Refresh” button next to your “Value” variable and the page should update with the new settings. At this point, we’re *almost* ready to put the code on your site.

The last item that needs to be changed is the default value when the user does not have javascript turned on. Since our “orderSubTotal” value comes from javascript, there’s not much chance of it having a value without javascript turned on…

Find the section of AdWords code in between the tags. Near the end of the URL within, you should see “value=orderSubTotal.” In this case, it would be wise to replace “orderSubTotal” with a value that represents the “average sale value” for your store. Here’s an example of a properly formatted AdWords code:

Example of a formatted AdWords code.