Order is saved into database in ShoppingCartPreview step (~\CMS\CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartPreview.ascx.cs
) in ProcessStep method.
I assume that you are using PayPal and Authorize .NET payment gateways which are already included in Kentico CMS.
You can use following code in mentioned files to access any order information:
OrderInfo oi = OrderInfoProvider.GetOrderInfo(this.ShoppingCartInfoObj.OrderId);
method, the same way as google analytics code is rendered.
Example on how to use this method (RegisterStartupScript) can be found in following file in SetupControl method:~\CMSWebParts\GoogleServices\GoogleAnalytics.ascx.cs
Detailed information about google e-commerce tracking codes can be found here
More information about our API can be found here