// // Create a fake order ID using the current // time and the unique identifier that GA uses to // track this visitor. // var timeObj = new Date; var unixTimeMs = timeObj.getTime(); var unixTime = parseInt(unixTimeMs / 1000); var orderID = pageTracker._visitCode() + '-' + unixTime; // // This function assigns order values depending // on what has been clicked and submits the transaction // function subscriptiontracker(subtype,value) { pageTracker._addTrans( orderID, // Order ID "", // Affiliation value, // Total "", // Tax "", // Shipping "", // City "", // State "" // Country ); pageTracker._addItem( orderID, // Order ID subtype, // SKU subtype, // Product Name "blog", // Category value, // Price "1" // Quantity ); pageTracker._trackTrans(); alert("Test successful"); }

Google AdWords PayPal conversion tracking code

by Kevin Gibbons on May 25, 2006

I have recently setup conversion tracking for a client to record PayPal buy now button clicks as a Google AdWords conversion. This can be done one of two ways, firstly you need to create a confirmation page containing your conversion tracking JavaScript using the usual process. Then you can either create a new button in PayPal and enter a successful payment URL during the setup or you can add the following code into the form tags of your buy now button.

This should go inside the HTML form tags:
<input type=”hidden” value=”http://www.yourdomain.com/yourconfirmationpage.html” name=”return”>

So the final code for the button should look something like this:
<form action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_xclick”>
<input type=”hidden” name=”business” value=”admanager@me.com”>
<input type=”hidden” name=”value” value=”http://www.seoptimise.com/confirmation.html”>
<input type=”hidden” name=”item_name” value=”Calculator”>
<input type=”hidden” name=”item_number” value=”101″>
<input type=”hidden” name=”amount” value=”105.00″>
<input type=”hidden” name=”currency_code” value=”USD”>
<input type=”image” src=”https://www.paypal.com/images/x-click-butcc.gif” border=”0″ name=”submit” alt=”Make payments with PayPal - it’s fast, free and secure!”>
</form>

The conversion details are also included inside the PayPal button to assign a value amount to the conversion but these do not have to be included.

No related posts.

Struggling to make your online marketing sparkle?

SEOptimise SEO

If you liked this post, you'll love what we can do with your SEO, PPC and online marketing campaigns. You can have the authors of this blog work directly on your campaigns!

{ 2 comments… read them below or add one }

Chad 08.12.08 at 1:08 am

I have been looking everywhere to find this out. Which way will it work? You have listed it 2 different ways. One has name=”value” and one has name=”return” I’m assuming name=”return”?

or

Chad 08.12.08 at 1:09 am

sorry wouldn’t let me put the code in.

input type=”hidden” name=”value” value=”http://www.seoptimise.com/confirmation.html”

or

input type=”hidden” value=”http://www.yourdomain.com/yourconfirmationpage.html

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>