Forum: Ruby on Rails Google Analytics code for Different Domains ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bcc578efe3bb69e763ec7695d675c06a?d=identicon&s=25 Srinath A. (srinathbtech)
on 2009-01-13 12:23
Hi,
How to track the pages for different domains, i have 2
domains(www.domain1.com and www.domain2.com) pointing to same
application.
What modifications should  i do in Environment.rb file, is it i need to
keep a condition?
i was using the code :

# configuring google analytics
Rubaidh::GoogleAnalytics.tracker_id = 'UA-5066152-1'
Rubaidh::GoogleAnalytics.domain_name  = 'domain1.com'
Rubaidh::GoogleAnalytics.environments = ['production']


Plz help me !!

thanks,
sri..
3d52a27007359841566a61e74054922b?d=identicon&s=25 Graeme Mathieson, Rubaidh Ltd (Guest)
on 2009-01-14 11:27
(Received via mailing list)
Hi,

Just spotted this on the list too.  For the sake of completeness,
here's the response I sent to the private email I got asking the same
question:

I believe there's a fork of the google analytics plugin which supports
multiple domains.  Check out:

  http://github.com/albanpeignier/google_analytics

I haven't thought of a clean way to merge it in that doesn't break
backward compatibility yet, which is why I haven't pulled the fork
back into master.

G


On Jan 13, 11:23 am, "Srinath A." <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.