To configure Google Analytics tracking in Magento please navigate to System > Configuration > Sales > Google API screen in Magento backend and set tracking account ID into Google Analytics / Account Number field and finally click on Save button:
The following article shows shows how to setup Site speed tracking with Google Analytics in Magento.