官术网_书友最值得收藏!

Analytics

In bygone years, people tracked visitors on their web site using server logs. While this is still accepted practice, it's difficult and time consuming to access enormous log files to figure out what's going on with your site. Several years ago, companies started releasing tools to make that process easier. They called their products Analytics.

Analytics packages help you track visitors on your web site—where they came from, what they do while on your site, where they are in the world, and if they bought your products or filled out your forms. It works by installing a small piece of JavaScript code in the footer of your site that pings a server every time a visitor loads a page. You could do this yourself but you'd have to process, filter, and store all that data on your own. A good analytics program is easier, faster, more robust, and in many cases free.

A good analytics program will help you learn which online marketing initiatives are cost effective and see how visitors interact with your site. With that information, you can make informed design improvements, drive targeted traffic, and increase your conversions and profits. Analytics won't make the tough decisions for you—they will give you the data you need to make those decisions.

Note

A few common question that analytics can help answer are as follows:

How many unique visitors did I get over the last month?

What is my conversion rate?

How can I improve the visitor experience on my web site?

Why isn't anyone buying my product?

Are the negative comments on my blog affecting my sales?

How many sales came from Adwords vs. my SEO campaign?

Are visitors engaged by my front page or turned off?

It's important to install analytics as soon as possible, so that you can start to accumulate data about your site visitors. The more data you have, the better the reports and decisions you will be able to make. Depending on your site traffic, it may take weeks or months before you have enough meaningful data to put to use improving your site.

While you only need one analytics program, two will allow you to compare results and be sure that your stats are relatively in sync with each other. Different programs track data in different ways. If they're inconsistent then it could reveal a problem that needs to be fixed on your site.

Google Analytics

There are dozens of analytics packages out there and it's hard to beat Google's free suite which is simply called Google Analytics. It's easy to install, quick to get started, and has easy-to-read charts. Yet, it boasts very powerful features like advanced segmentation, customizable reporting, and industry benchmarking.

When using Google Analytics with Drupal, it's even better. It's easy to install, configure and test thanks to the Google Analytics module. The Google Analytics module was first created by Mike Carter and is now maintained by Alexander Hass. Thank you, gentlemen!

Creating a Google Analytics account and installing it on your Drupal site

To create a Google Analytics account and install it on your Drupal site, carry out the following steps:

  1. Visit http://www.google.com/analytics and click the Sign Up Now link.
  2. Log in using your Google account.
  3. Fill out your web site information.
  4. Click on Continue and fill in your contact information.
  5. Click on Continue. Here you'll read and agree to the User Agreement. You'll also notice that you're opted in to anonymously share your Google Analytics data. According to Google, Shared data will be used to improve the services we provide you and will help create more powerful features for you to choose from. There are two levels of sharing.
  6. Finally, click on Create New Account. You're done!
  7. Now install the Google Analytics module. It installs normally like any other Drupal module. See earlier in this chapter for step-by-step module installation instructions. Here's the short version: Download the module, drop it into your /sites/all/modules folder, go to /admin/build/modules, and turn it on.
    Creating a Google Analytics account and installing it on your Drupal site
  8. To configure the module, point your browser to www.yourDrupalsite.com/admin/settings/googleanalytics at the top of the page and you will be able see a screen similar to the following screenshot:
    Creating a Google Analytics account and installing it on your Drupal site
  9. Go back to your Google Analytics account and you should see a number next to your URL name that starts with UA-, as shown in the following screenshot:
    Creating a Google Analytics account and installing it on your Drupal site
  10. Copy and paste your site's UA number into your Drupal site. (Don't use mine! Get your own!) If you don't see this, click the Analytics Settings link, located at the upper left corner.
  11. Under User Specific Tracking Settings, make sure that Users cannot control whether they are tracked or not option is selected. This makes sure that you're tracking all your visitors and they can't turn off the tracking.
  12. Under Role specific tracking settings, you will have a few options. For most sites, you want to check everything except the authenticated user option, as shown in the following screenshot:
    Creating a Google Analytics account and installing it on your Drupal site

    Note

    Role specific tracking settings is one of the best things about the Google Analytics module. One of the common problems with Google Analytics is that it tracks everything that happens on your site—even your own activity. So, if you visit your site a lot (which you probably should) then you'll skew your Analytics. Telling Drupal to not track admin users will dynamically show or not show Google's tracking code depending on if a user is the site admin. There are many uses for this. Say you don't want to track any of your company's users. Just give them a custom account type (like staff) and deselect the checkbox in the Google Analytics module. Clean, easy, and works like a champ!

  13. Except for advanced needs, the rest of the settings should be left as the defaults. Click on Save configuration. You're done!

    Tip

    Common mistake when configuring the Google Analytics module

    Under Advanced settings, there is a field called Custom JavaScript Code. DO NOT put your Google code there. If you've put your Google account information at the top of the admin page then the module will write all the code automatically. The Custom JavaScript Code field is for special code snippets that are added to the tracking code (refer to drupal.org/node/248699). If you put the full code there then you will track every user on your site twice. Not good!

Google's help pages say 'Once you've correctly installed your tracking code, you should allow up to 24 hours for data to appear in your account'. Check back tomorrow and you should see some data. It starts to get really interesting when you've accumulated several months worth of data. Be patient—it's well worth the wait.

Yahoo! Analytics

Yahoo! recently launched their own analytics package called Yahoo! Analytics. It's getting good reviews as an alternative to Google Analytics. As of this writing it's only available to Yahoo!'s search and display advertisers. For more information visit the following link: http://web.analytics.yahoo.com/.

主站蜘蛛池模板: 高邮市| 古蔺县| 庆阳市| 海晏县| 怀远县| 肥西县| 炎陵县| 文水县| 汝城县| 上思县| 昌都县| 黑山县| 牙克石市| 寿光市| 綦江县| 兴文县| 蓬溪县| 文昌市| 宜昌市| 大英县| 孝感市| 扬州市| 临城县| 日土县| 成都市| 广汉市| 伊春市| 伊川县| 厦门市| 临江市| 南开区| 彝良县| 海盐县| 且末县| 云阳县| 平湖市| 菏泽市| 嘉定区| 梁河县| 定南县| 平凉市|