1
votes

I have google analytics setup for tracking e-commerce transactions when a user returns back from the payment gateway (In this case paypal or barclaycard epdq). This works well when a user comes back to my website and visits a 'thankyou' page the google analytics code gets triggered but when the customer pays for their order and then doesn't come back to the thankyou page the analytics code doesn't get triggered and therefore the transaction doesn't show up in google analytics therefore rendering the data incomplete.

I need a way to trigger the e-commerce analytics code which is in javascript even if the user doesn't visit the page. So when I get the server side response from paypal that the payment has been made I can then somehow trigger the analytics code here incase the user doesn't return to the thankyou page.

Thanks for your help

2

2 Answers

1
votes

One alternative solution is the following:

  1. Place the ecommerce tracking before payment --> you will record more transactions than the real one
  2. Cancel transactions not confirmed by following Google instructions (see http://www.google.com/support/analytics/bin/answer.py?hl=en-uk&answer=72290)

It's not the perfect solution but it works.

0
votes

You can setup Paypal (IPN) to call back to your site when a customer has completed a transection.

Here is the two Paypal link:

https://www.paypal.com/ipn

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_html_paymentdatatransfer