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