Please check this link. Google already provides a PHP API for eCommerce tracking.
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2 years ago