Ecommerce entails tracking for transactions completed by the visitor.
Below is an example of where you should include it:
Initiates a transaction. Note that the City, State and Country fields have been removed, and the total is no longer required.
Adds an item to the transaction. Do note that the required fields have changed.
Sends the transaction to Google Analytics.
Since ecommerce can be a more complex subject with Google Analytics, the following is a full example of what a sample implementation might look like.
Clears all transaction data. This was an undocumented feature in ga.js, but it's now documented for analytics.js!