View Single Post
  #1  
Old 06-16-2008, 10:51 AM
  BunnyburyBaby's Avatar 
BunnyburyBaby BunnyburyBaby is offline
 

Advanced Member
  
Join Date: Nov 2007
Location: Los Angeles
Posts: 32
 

Default Google Checkout - How to add tracking info.

Hello,

I am trying to integrate my Commision Junction program. I have the Image Pixel tracking working great, but they need to track sales done via Google Checkout.

After looking into it I found that you can add a tracking beacon to the final page at google checkout:

http://code.google.com/apis/checkout/developer/checkout_pixel_tracking.html

In gcheckout.php, there is a section:

Code:
<?xml version="1.0" encoding="UTF-8"?> <checkout-shopping-cart xmlns="http://checkout.google.com/schema/2"> <shopping-cart> <merchant-private-data> <merchant-note>$unique_id</merchant-note> </merchant-private-data> <items> $items </items> </shopping-cart> <checkout-flow-support> <merchant-checkout-flow-support> <platform-id>429557754554554</platform-id> <request-buyer-phone-number>true</request-buyer-phone-number> $shipping_xml $merchant_calculations_xml <edit-cart-url>$xcart_catalogs[customer]/cart.php</edit-cart-url> <continue-shopping-url>$current_location/payment/ps_gcheckout_return.php?mode=continue&#x26;skey=$unique_id</continue-shopping-url> $tax_tables </merchant-checkout-flow-support> </checkout-flow-support> </checkout-shopping-cart>


My question is how do I pass the parameterized-url? It needs to contain the same information contained in the trackin pixel used in order_message.tpl. That snippit is:

Code:
{foreach from=$orders item="order"}<img src="https://www.bunnyburybaby.com/u?CID=24145&OID={$order.order.orderid}&TYPE=5000{foreach from=$order.products item=product name=pr}&ITEM{$smarty.foreach.pr.iteration}={$product.productcode}&AMT{$smarty.foreach.pr.iteration}={$product.price}&QTY{$smarty.foreach.pr.iteration}={$product.amount}{/foreach}&CURRENCY=USD&METHOD=IMG" height="1" width="20">{/foreach}

so that the xml outputs like this:


<parameterized-urls>
<parameterized-url url="https://www.bunnyburybaby.com/u?CID=241145&OID=11561&TYPE=5000&ITEM1=CL-LC-GREEN&AMT1=39.95&QTY1=1&ITEM2=HS-INDIE&AMT2=35.27&QTY2=1&ITEM3=BO-601&AMT3=14.95&QTY3=1&ITEM4=GIFTWRAP&AMT4=7.50&QTY 4=1&CURRENCY=USD&METHOD=IMG" />
</parameterized-urls>
</merchant-checkout-flow-support>
</checkout-flow-support>
</checkout-shopping-cart>

I need to call all the product and order information in gcheckout.php and format it to output the xml above. Any ideas on how to do this?

Thanks folks!
Bunnyburybaby
__________________
X-Cart Version 4.1.8
Reply With Quote