6 / 6
Mar 2011

I love how easy it is to set up Google Analytics Ecommerce tracking with the shopping cart (including, the thank-you page being set up automatically with the tracking script!). However, I only sell one product per website and find the Buy Now flow much more appropriate (click Buy Now, redirect to Paypal). What's the easiest way to make the Buy Now button log the purchase on GA?



I was thinking of using E-Junkie's provided shopping cart code, but tweaking button's Javascript to add the item to the shopping cart and check out in one step. Was wondering if anyone has done this before, or has a better idea.

  • created

    Mar '11
  • last reply

    Mar '11
  • 5

    replies

  • 1.1k

    views

  • 3

    users

  • 4

    links

If you're using a Buy Now button, our cart's built-in GA tracking features won't work at all, so you can't use our version of the GA tracking code nor take advantage of the Ecommerce Tracking code and details we include in the thank-you page.



Instead, you'd need to use GA in their standard manner, using the regular tracking code Google provides and adding that to your pages and to your thank-you pages. This help page explains how to customize your E-junkie thank-you pages:

http://www.e-junkie.com/ej/help.custom.thankyou-page.htm



Conversion tracking with GA is clumsy and tricky, but see this help page for some tips:

http://www.e-junkie.com/ej/tips.tracking.conversions.htm

Thanks for your reply.



I read through those help pages previously and decided that I didn't want to use the plain Buy Now code, since it seems like a hassle to implement and E-junkie provides little support for it.



Could I use the E-junkie shopping cart, but on button click just run the Javascript to both add an item to the cart and then submit it? That seems straightforward and feasible (since it's a strict subset of the cart functionality) but I don't know the correct calls.

We don't have any way to add an item to the cart and then automatically send the cart to checkout. If you're handy with javascript or want to hire a developer who is, you're welcome to try writing some custom scripting to do that; we can recommend the developers listed in our directory here:

http://www.e-junkie.com/ej/developer-directory.htm

Thanks! Do you have an API for the cart or any kind of documentation for developers?