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:
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://”
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.
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: