Tracking Google Checkout Sales, Part 2
January 23rd, 2007 | Published in Google Analytics
Last post, we told you about a way to use Google Analytics to see your Google Checkout transaction data. Today, we'll show you the alternate method of posting Checkout API requests,
Method 2 for posting Checkout API requests into Google Analytics
In this method, the form that displays the Google Checkout button submits to another URL on the merchant’s website. That URL hosts an application that creates a Checkout API request, executes a server-to-server POST request, and lastly captures Google’s response to that request. The response contains the Google Checkout URL to which the customer should be redirected. To track shoppers while using this method, merchants will need to make the following changes:
1. Add the JavaScript call below to each page that displays a Google Checkout button; HOWEVER, before making this call your page should display all of the forms that display Google Checkout buttons. Your page should also include the standard Google Analytics tracking code before you make this call.
2. Add the following hidden input field to each form on your site that displays a Google Checkout button:
3. For each form that displays a Google Checkout button, add an onsubmit attribute to the element. The onsubmit element should call the setUrchinInputCode JavaScript function as shown in the following example:
Method 2 for posting Checkout API requests into Google Analytics
In this method, the form that displays the Google Checkout button submits to another URL on the merchant’s website. That URL hosts an application that creates a Checkout API request, executes a server-to-server POST request, and lastly captures Google’s response to that request. The response contains the Google Checkout URL to which the customer should be redirected. To track shoppers while using this method, merchants will need to make the following changes:
1. Add the JavaScript call below to each page that displays a Google Checkout button; HOWEVER, before making this call your page should display all of the forms that display Google Checkout buttons. Your page should also include the standard Google Analytics tracking code before you make this call.
2. Add the following hidden input field to each form on your site that displays a Google Checkout button:
3. For each form that displays a Google Checkout button, add an onsubmit attribute to the element. The onsubmit element should call the setUrchinInputCode JavaScript function as shown in the following example: