For some reason I found it pretty hard to find Google Analytic’s (GA) API on Google itself.
Most GA users usually use the default installation by just copying and pasting the code into their templates to track website statistics.
If you’re interesting it configuring GA to track e-commerce transactions and customising how GA records your traffic and visitors, visit the Google Analytic’s API.
The documentation is quite good and easy to understand (somewhat similar to Java’s API documentation).