I use Google E-Commerce Tracking to track sales and offer different payment methods.
For credit card payment and Paypal the user is redirected to a thankyou page after successful payment and the Google E-Commerce Tracking code is executed there. That works fine.
I also offer barcode bills and ibon as payment method. That means the user prints a bill with a barcode or ibon code and goes to a 7-11 to pay it with cash. The information about the payment is sent from 7-11 to my payment provider and they send me a notification about a successful payment back to my notification url. It normally takes 2 days until I receive this notification.
My problem is:
In this case there is no website displayed to the user where I can enter the E-Commerce Tracking code. The notification url is a page with php only and updates the database.
So, how do I execute the Google E-Commerce Javascript on a php page which is not displayed in the browser?
check out the Google Measurement Protocol Developer Guide, that describes how to send the data with HTTP requests, so you can do it for example with PHP and cURL
https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
https://developers.google.com/analytics/devguides/collection/protocol/v1/reference