开发者

Rails + Google Analytics

I want to ask some question about using Rails (2.1.0) and Ruby (1.8.7).

I have development mode and production. 开发者_如何学CProduction mode has a domain (for example blabla.online.com), development mode has an ip adress (for example 199.199.199.199).

QUESTION: Do I need to create two different accounts in analytics (one for development and one for production)?


You don't want multiple "Accounts", but you do want multiple "Website Profiles".

  1. Login to Google Analytics, you should be on a page with title "Overview: all accounts"
  2. Click on the link for the correct account (in your example it's probably called "online").
  3. You should now be on a page with title "Overview >> online" that shows a list of all website profiles associated with this account.
  4. At the bottom of the table click "Add website profile"

Note that your new website profile will have a different tracking ID (e.g. the thing that looks like UA-255235386-2) so you'll need to have an environment specific configuration in your Rails app to use the appropriate tracking ID for the appropriate environment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜