# \[ANN\] SiteMeter is now Sitealizer v.1.1 Web Stats plugin

**URL:** <https://www.ruby-forum.com/t/ann-sitemeter-is-now-sitealizer-v-1-1-web-stats-plugin/89494>\
**Category:** Rails\
**Created:** [March 20, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/ann-sitemeter-is-now-sitealizer-v-1-1-web-stats-plugin/89494 "2007-03-20T20:55:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thiago\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@Thiago\_J](https://www.ruby-forum.com/u/Thiago_J)\
**Post date:** [March 20, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/ann-sitemeter-is-now-sitealizer-v-1-1-web-stats-plugin/89494/1 "2007-03-20T20:55:51Z")

</div>

The old ‘sitemeter’ plugin has been changed to Sitealizer v.1.1 Web  
Stats plugin for Rails. Please update your bookmarks to point to  
[http://sitealizer.rubyforge.org](http://sitealizer.rubyforge.org)

This change includes:

- [FIX] General bug fixes
- [NEW] Added 3 new rake tasks that allows you to update the plugin,  
uninstall it and upgrade from the old ‘sitemeter’
- [NEW] Added a link to whois under Hosts so you can see the host’s  
location

– Installation –

On your Rails’ root directory, just type  
script/plugin install [http://opensvn.csie.org/sitealizer](http://opensvn.csie.org/sitealizer)

and add the following line to your config/routes.rb:  
map.connect ‘/sitealizer/:action’, :controller =\> ‘sitealizer’

– Upgrading from SiteMeter –

If you had previously installed ‘sitemeter’ you need to run the  
following command for both production and development env after  
installing Sitealizer, otherwise your stats will not be imported:  
rake sitealizer:remove\_sitemeter

You also need to change:

- include SiteMeter TO Include Sitealizer
- before\_filter :use\_site\_meter TO before\_filter :use\_sitealizer
- map.connect ‘/sitemeter/:action’, :controller =\> ‘sitemeter’ TO  
map.connect ‘/sitealizer/:action’, :controller =\> ‘sitealizer’

– Usage –

To track the visitors on your entire application, just edit your  
ApplicationController(application.rb):

class ApplicationController \< ActionController::Base  
include Sitealizer  
before\_filter :use\_sitealizer  
end

Or to track specific controllers:

class ApplicationController \< ActionController::Base  
include Sitealizer  
end

class MyController \< ApplicationController  
before\_filter :use\_sitealizer  
end

– Viewing the stats –

To view your stats just add “/sitealizer” to your main url:  
[http://www.example.com/sitealizer](http://www.example.com/sitealizer)

More info =\> [http://sitealizer.rubyforge.org](http://sitealizer.rubyforge.org)

–  
Thiago J.  
acts\_as\_solr =\> [http://acts-as-solr.rubyforge.org](http://acts-as-solr.rubyforge.org)  
Sitealizer Web Stats =\> [http://sitealizer.rubyforge.org](http://sitealizer.rubyforge.org)

---

<div class="post-metadata">

**Author:** ![Thiago\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@Thiago\_J](https://www.ruby-forum.com/u/Thiago_J)\
**Post date:** [March 21, 2007, 12:29am UTC](https://www.ruby-forum.com/t/ann-sitemeter-is-now-sitealizer-v-1-1-web-stats-plugin/89494/2 "2007-03-21T00:29:04Z")

</div>

When running Edge, you might find the following line necessary in  
sitealizer\_controller.rb

prepend\_view\_path(“#{RAILS\_ROOT}/vendor/plugins/sitealizer/lib/app/views”)

It goes in the class methods … just after the before\_filter. Then  
remove  
the template\_root= method.

Cool plugin, BTW.

Andrew-153 wrote:

> - [NEW] Added a link to whois under Hosts so you can see the host’s

–  
View this message in context:  
[http://www.nabble.com/-ANN--SiteMeter-is-now-Sitealizer-v.1.1-Web-Stats-plugin-tf3436193.html#a9584023](http://www.nabble.com/-ANN--SiteMeter-is-now-Sitealizer-v.1.1-Web-Stats-plugin-tf3436193.html#a9584023)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Thiago\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@Thiago\_J](https://www.ruby-forum.com/u/Thiago_J)\
**Post date:** [March 21, 2007, 1:12am UTC](https://www.ruby-forum.com/t/ann-sitemeter-is-now-sitealizer-v-1-1-web-stats-plugin/89494/3 "2007-03-21T01:12:22Z")

</div>

Steve,

Thanks for the tip and the feedback! I’ll certainly make use of that.  
This plugin hasn’t been tested with edge rails, just with the stable  
releases.

–  
Thiago J.  
acts\_as\_solr =\> [http://acts-as-solr.rubyforge.org](http://acts-as-solr.rubyforge.org)  
Sitealizer Web Stats =\> [http://sitealizer.rubyforge.org](http://sitealizer.rubyforge.org)

Steve R. wrote:

> When running Edge, you might find the following line necessary in  
> sitealizer\_controller.rb
> 
> prepend\_view\_path(“#{RAILS\_ROOT}/vendor/plugins/sitealizer/lib/app/views”)
> 
> It goes in the class methods … just after the before\_filter. Then  
> remove  
> the template\_root= method.
> 
> Cool plugin, BTW.
