PDA

View Full Version : Google checkout - 3rd party affilifate tracking integration



paul
13-05-2008, 09:06
Hi, I use Webgains as an affiliate manager. I therefore need to send conversion code to them in order that they can track conversions for my site. This has been done for the Bluepark integrated checkout option by placing code on the confirmation page.

I have recently added the Google Checkout option. It seems this needs an additional piece of code integrated into the xml file sent to Google (I think!) in order for Webgains to track conversions.

Is this possible?

Thanks.

Rich
13-05-2008, 11:07
This can also be done for Google Checkout, the Additional XML field must be used on the Google Checkout tab. Have a look at an example on Google's site:

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

The XML you need to enter is basically everything between the <parameterized-urls> tags. Specifically, note that any occurrences of & are converted to &amp; in the URL itself.

The variables used in the <url-parameter> tags, such as the order-id, may be selected from the following list:

http://code.google.com/apis/checkout/developer/checkout_pixel_tracking.html#googleCheckout_tag_ur l-parameter

If you have any difficulties with this, paste your conversion URL here and I'll show you how I would convert it to an XML version.

paul
14-05-2008, 09:10
thanks for the reply. its all a bit confusing. Just one question really. Where do i insert the code?!

I assumed it was in the confirmation page in: Configuration|Order|Conversion code. but am confused by your sentence:


the Additional XML field must be used on the Google Checkout tab.

Rich
14-05-2008, 09:17
This is the Google Checkout tab where you configure Google Checkout. Select it from the Payment tab and click Save.

paul
14-05-2008, 10:39
Ah yes, I remember now. Just a note to others following this:

Selecting and saving GC from the payment tab changes the default option in the checkout page to GC. So if you dont want GC as the default remember to save back to your default when you're done making the changes to GC payment options.

Also note you need to retick the 'Accept Google Checkout' tickbox in the payment tab after you've done this it gets removed after saving back to your default.

......at least it did on mine anyway!

paul
04-06-2008, 08:57
Hi, I have added the xml script but the purchases are not being tracked.

Is the code sufficient to send confirmation of an order to webgains or do i need to add some code to another page? And secondly should the xml code appear on the google checkout confirmation page in 'view source' (it doesnt currently)?

i include the code inserted in the GC additional xml field below (replacing the xxx with the relevant ids.

If you can see anything wrong please let me know:confused:

john
04-06-2008, 09:10
Hi Paul,
our tracking is on Affiliate Window and the additional code for GC is:-

<parameterized-urls>

<parameterized-url url="https://www.awin1.com/sread.img?tt=ns&amp;tv=1.0&amp;merchant=XXXX&amp;testmode=0&amp;vc =%coupon">

<parameters>

<url-parameter name="ref" type="order-id"/>

<url-parameter name="amount" type="order-subtotal-plus-shipping"/>

<url-parameter name="parts" type="order-subtotal-plus-shipping"/>

</parameters>

</parameterized-url>

</parameterized-urls>

It works fine, if you replace the "url="https://www.awin1etc etc with your Webgains url and tracking code, it should work fine for you too, as you can see ours is set for value of sale excluding Vat

paul
04-06-2008, 09:35
thanks john.

ihave attached my latest code now using your subtotal variable and also noting a missing </parameterized-url> which ive added. i also note i have the merchant support tags which you dont.

however now the code gives me an error when attempting a purchase via google whereas previously i just couldnt track the purchase! i cant see whats wrong with it however.

john
04-06-2008, 10:21
Did you insert <merchant-checkout-flow-support> and </merchant-checkout-flow-support>
or did you get this from a page source shot, if you inserted them in the Bluepark additional code field I think that may be the problem, the code I posted is the whole of the code needed from you (with the changes unique to you).
I believe Rich has already made provision for this code to go in the right place in GC so you don't need to add the <merchant-checkout-flow-support> ---</merchant-checkout-flow-support>

Rich
04-06-2008, 11:20
I believe Rich has already made provision for this code to go in the right place in GC so you don't need to add the <merchant-checkout-flow-support> ---</merchant-checkout-flow-support>

This is correct.

paul
04-06-2008, 17:26
thanks - youre correct i did include the mechant support tags. ill give this another bash tomorrow.

paul
05-06-2008, 09:11
ive amended the code but still get an error from google saying the shopping cart has errors in it. its a bit wierd as the error google gives is that i dont have a closing </parameterized-urls> tag:

"Error parsing XML; message from parser is: The element type "parameterized-urls" must be terminated by the matching end-tag "</parameterized-urls>"."

but this is the code i included which does have a closing tag, doesnt it?

<parameterized-urls>
<parameterized-url url="https://track.webgains.com/transaction.html?
wgver=1.1&wgprogramid=xxx&wgrs=1&wgeventid=xxx"/>
<parameters>
<url-parameter name="wgorderreference" type="order-id"/>
<url-parameter name="wgvalue" type="order-subtotal"/>
</parameters>
</parameterized-url>
</parameterized-urls>

Rich
05-06-2008, 11:04
I have to say, that does look right - and my understanding is that this is working for other users. You may need to contact Google's tech support on this one.

I know that Google feeds back the entire XML sent when it reports its errors, so if you paste the entire XML code into a text file and send it to me via email I'll see if I can find anything obvious.

Rich
05-06-2008, 21:18
<parameterized-urls>
<parameterized-url url="https://track.webgains.com/transaction.html?
wgver=1.1&wgprogramid=xxx&wgrs=1&wgeventid=xxx"/>
<parameters>
<url-parameter name="wgorderreference" type="order-id"/>
<url-parameter name="wgvalue" type="order-subtotal"/>
</parameters>
</parameterized-url>
</parameterized-urls>

I believe I've spotted the problem, it's to do with the way tags are closed in XML.

The problem line is this one:



<parameterized-url url="https://track.webgains.com/transaction.html?
wgver=1.1&wgprogramid=xxx&wgrs=1&wgeventid=xxx"/>

It should be:



<parameterized-url url="https://track.webgains.com/transaction.html?
wgver=1.1&wgprogramid=xxx&wgrs=1&wgeventid=xxx">

The difference is that the corrected line ends with just ">" as opposed to "/>". The forward slash prematurely closes the tag, but this particular tag is actually closed later with </parameterized-url>. I'll bet this is causing the parsing error.

You'll notice that the <url-parameter/> tags are allowed to close themselves, as they have no "children".

Have a go with the corrected line, I think it will be successful. :)

paul
05-06-2008, 21:49
indeed it has. thanks alot.