The easiest way to do this is with Google Analytics. You’d just need to include a short JS snippet in all your pages, or your master template.
For a VERY simple e-commerce site (i.e. click to BUY, or ADD TO CART) and not having to worry about having your own merchant account, SSL, gateway account, security for keeping CC numbers or any of that… is using the Paypal Shopping Cart. People just click “BUY”, then they checkout using Paypal (paying for your items using either their PP account/balance or a credit card).
The next level of complexity is having your own Inventory Management Database/Cart system… total the orders, and then send the total final amount to Paypal (including shipping, taxes, fees, etc) and let Paypal handle the checkout process. When the transaction is successful/finished, Paypal sends a callback to a “secret URL” you specify, where you receive the confirmation and know that order has been paid, etc. Paypal just gets a small percentage cut (varies depending on your sales volume amount).
The next level of complexity is using a Gateway, like Paypal Payflow.
Now, this is more along the traditional way of doing things where you must have a merchant account. And the process in getting an MA is more involved… linked bank account, business license, credit check, etc… Here, you’d be responsible for keeping customer accounts secure, their credit card #s secure, address validation, etc…