Google Analytics

Once you have your site online, catalog ready, and are ready to process payments and shipping, the last step is attracting customers to your site. Advertising and good search engine optimization will help get people to your site, but the goal is to turn those people into customers. To do this you need to create a user experience that is favorable to the customer. While knowing what customers think and feel about your site is difficult to tell without direct surveys, there are tools that can help you infer what sections of your site help make sales and what don't. The Drupal Google Analytics module uses Google Analytics to provide all kinds of information about your site (number of visits, where your users come from, how long they visit, what pages they see, etc.) that can help you optimize your customer experience.

Configuration

After copying the module to your Drupal Installation's module directory. Enable the module at admin/build/modules. If you haven't done so, you will need to register for Google Analytics with a Google account.

Getting a Google Analytics ID

After signing up for a Google Analytics account, you should look for the "Add Website Profile" on the Google Analytics dashboard page. After you go there, choose a "add a profile for a new domain" and enter your website address and timezone. After hitting continue, you should see some javascript code like this:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-XXXXXXX-Y";
urchinTracker();
</script>
UA-XXXXXXX-Y is the tracking ID for the site. Copy this text for use with the Google Analytics module.

Setting Up the Drupal Module

Browse to admin/settings/googleanalytics on your site. In the User ID field, you can enter the tracking ID that you copied earlier. From here, you can set up the Drupal user roles and profile information (if you've enabled Drupal's profile module) you'd like to track. After clicking "Save Configuration", your website should be set up to send Google Analytics information to Google every time a page is viewed on your site. You can confirm this by going back to the Google Analytics dashboard. In the website profiles box, under the status column, it will read "Receiving Data" if Google Analytics is receiving tracking information from your site.

More Information

Read more about the module on drupal.org.