Hi all, <p> Continuing our recent theme of "awesome things nobody has even thought of yet", I've just rolled out a new (somewhat experimental) module to make it easy for your users to make use of[a href="http://www.google.com/analytics/">Google Analytics</a>. As you know, Virtualmin automatically sets up Webalizer and AWstats, which are cool packages. But, there's a lot of data about website usage that neither of those packages has easy access to. Conveniently, Google does, and they let you see it for free in the form of really nice looking graphs. All around Google Analytics rocks pretty good, but I don't know many people using it, because it requires a few tricky bits. This module takes away a couple of the tricky bits (you still have to sign up and get an ID). <p> The way this module works is it automatically adds a mod_perl filter to your Apache process for any domains for which Analytics is enabled. The filter injects the magic JavaScript string with the users ID in just the right place on every page, no matter how it was generated (static HTML put in place via FTP/SSH or the WYSIWYG editor, PHP script, Perl script, Ruby script, SSI, whatever). Your user doesn't need to know where to edit template files or even how to edit HTML, and they don't have to ask for any customer support, either (probably...we'll have to see if the UI provides enough guidance for folks). <p> Anyway, this module rocks and I've already started using it, and Jamie is a bloody genius (I watched him write it during dinner at YCombinator Tuesday night while James Hong was talking about[a href="http://hotornot.com">HOT or NOT</a>). <p> Now, of course, you'd like to get on with it! So, to install it, first make sure you've got mod_perl. I believe this is kinda default for everybody except the Debian-ites and Ubuntuns. So, for you guys, we'll add an extra package to your install list (we might need to configure it too...I'll have to poke around a bit to see, and will post more to this thread in the news forum later). <p> To install on Red Hat based systems: <p> yum install wbm-virtualmin-google-analytics <p> On SUSE systems: <p> yast -i wbm-virtualmin-google-analytics <p> On Mandriva systems: <p> urpmi.update -a urpmi wbm-virtualmin-google-analytics <p> And on Debian and Ubuntu systems: <p> apt-get update apt-get install webmin-vritualmin-google-analytics libapache2-mod-perl2 <p> To install on systems using .wbm and .wbt packages, download the module from: <p> http://software.virtualmin.com/wbm/virtualmin-google-analytics-1.0.wbm.gz <p> Using your serial number as the username and your license key as the password. Then install it using the Webmin Modules module. <p> Finally, you'll have to enable it for any domains that you'd like to use this feature on. Once enabled, the domain owner can click the Google Analytics option from the Services menu and fill in their UID (which is an identifier that looks like "UA-2498289-1", which you get by signing up at the Google Analytics page). <p> As always, let us know about any bugs you find. And let us know if you or your users find the UI uninformative or difficult to use. It's a sort of vague concept, but we believe it's a lot easier than figuring out which files need to be edited within your CMS, blog, wiki, issue tracker, whatever, as well as every static page you serve up. (Also, feel free to tell all of your web developer and system administrator friends how awesome Virtualmin is for automating this.)
"Once enabled, the domain owner can click the Google Analytics option from the Services menu"
This implies (to me) looking under "Virtualmin->Services".
I didn't find it there. After a lot of searching, I found it under Webmin->Servers->Google Analytics Reporting.
If I click on a domain name (to activate), it says Error 404, page not found for every domain, so it's not working for me...
Be careful - this module appears to be a bit buggy right now! See details below....
First, these are the steps I used to set it up:
1) Using the Virtualmin Framed Theme, expand the System Settings category and click on Plugin Modules. (If you're using another theme, this should appear as a button near the bottom of the main Virtualmin page.)
2) Control-click to enable the Google Analytics Tracking plugin, and click Save.
3) Select the domain you wish to add this feature to, and click on Edit Virtual Server.
4) Under the Enabled Features section, select "Enable Google Analyics tracking?" and click Save Virtual Server.
5) Now, under the Services category in the left frame menu, click on the new option for Google Analytics Account (for that same domain).
6) Click on Set To, enter your UID, and click Save.
Now, here's the bad part: ALL OF MY WEBSITES WERE COMPLETELY DOWN! Apache refused to start, with the following error:
failed to load Virtualmin::GoogleAnalytics package
... along with a long list of Perl errors prior to that, which I can post separately.
So, I quickly tried to disable this module to undo what it did so I could get Apache to start back up. First, I tried to disable the plugin entirely. That didn't work. Then, I re-enabled the plugin so I could disable it from the one server I added it to. That didn't work either. Finally, I found the lines that it added in apache.conf for that virtual server and commented them out:
#PerlRequire /etc/webmin/virtualmin-google-analytics/apachemod.pl
#PerlOutputFilterHandler Virtualmin::GoogleAnalytics
#PerlSetVar AnalyticsID UA-xxxxxxx-x
At that point, I was able to restart Apache successfully (without this feature).
I had the same problem that post #3 had and have completely removed this module. It is VERY unstable and should be considered ALPHA code and NOT BETA which would imply that it is pretty much stable and it isn't.
Needs much more testing before actual usage.
But really is this module needed? The GA code is so simple to put into the website pages I think this module is more of a toy then a helpful module.
Hey Scott,
<i>I had the same problem that post #3 had and have completely removed this module. It is VERY unstable and should be considered ALPHA code and NOT BETA which would imply that it is pretty much stable and it isn't.
Needs much more testing before actual usage.</i>
Yep, it freaks out with old mod_perl. Sorry for the inconvenience. There's a new version that won't freak out, and will safely refuse to work with mod_perl 1.99 and below. I'm packaging mod_perl2 for everyone now.
<i>But really is this module needed? The GA code is so simple to put into the website pages I think this module is more of a toy then a helpful module.</i>
For you and me, it's super easy. For someone who wants to run a blog or wiki or forum (and used Install Scripts to install it) while still getting good analytics, it's probably not easy at all...maybe even impossible. You have to know where to find the end body tag in the right templates directory within your application(s)--and you need to know how to edit HTML to insert it without breaking things.
These are assumptions that we can safely make about most of our current users--like you and Alan--but going forward we want everyone (<i>everyone</i>, <i><b>everyone</b></i>) to be able to make interesting, good looking, and useful web pages, and learn useful things about their readership. As you know, we're building tools for the hard core guys like you, and we've been doing that for years. But now, we're trying to make Virtualmin useful for the folks who have never built a website. Screwing up your Apache configuration is clearly not the right way to do that--so we went back to the drawing board quick-like--but allowing non-technical Virtualmin users to make use of cool tools like Google Analytics is definitely a win for most of those folks.
I actually find it pretty nifty too--because I no longer have to think about "OK, did I get that tag added to all of my various applications in all of my various templates and subdirectories". We'll be running several applications when the new website goes live (instead of the single platform we have now), and getting all of them into analytics is important to me. When it's working right it adds the tag to every page served by Apache for the entire domain--no thought or searching for where to add it needed.
I believe our botched roll-out has given you a bad impression of the whole idea. Hopefully, when we get it fixed, you'll come around. ;-)
--
Check out the forum guidelines!
As far as I can tell, I've got the prerequisites...
mod_perl 2.0.2-6.3.el5
Google analytics account, functional
I removed the urchin script from the footer of my wordpress template (was working fine and allowing Google data collection).
I have entered my Google Analytics account ID in "Virtualmin Analyics" (sic) for the domain, however Tracking Status reports "Enabled but no account set"
I can't see any urchin script code inserted when I view source... is it inserted in apache header, or is supposed to be inserted in the html?
Update: it apparently was "somewhat" working, because it was adding an abbreviated urchin script to standard HTML files... but not php files.
"not php files" = "not Wordpress"
I haven't tried the analytics deal with other php scripts/templates yet. I mostly use phpBB, Wordpress and Joomla.
Hmmm...Strange. There is an update to that module going into the repo today, so maybe there's a bug that I wasn't aware of.
It should work on HTML, PHP, CGI, whatever. That's the fancy thing about it. If it doesn't work in all of those contexts, then it fails at being fancy...and we refuse to fail at being fancy. ;-)
--
Check out the forum guidelines!
FYI, I have submitted the following bug reports:
<A HRef="http://www.Virtualmin.com/bug-tracker/bug?bug%5fnumber=715">Bug #715</A>: New Google Analytics Plug-in Breaks Apache
<A HRef="http://www.Virtualmin.com/bug-tracker/bug?bug%5fnumber=716">Bug #716</A>:Error Disabling Google Analytics
<A HRef="http://www.Virtualmin.com/bug-tracker/bug?bug%5fnumber=717">Bug #717</A>:Google Analytics Reporting Module Error
<A HRef="http://www.Virtualmin.com/bug-tracker/bug?bug%5fnumber=718">Bug #718</A>:RFE: Google Analytics Reporting Module vs. Virtualmin Plugin
New 1.1 has been released which refuses to break your Apache config if only the old mod_perl is available. I'm packaging mod_perl2 for everyone as we speak to correct remaining issues.
--
Check out the forum guidelines!
Looks like it's working properly on standard versions of Joomla 1.0, 1.5 and Wordpress.
The particular Wordpress install I was having trouble with, I ended up doing the manual Google urchin script method (put urchin code in the footer.php theme file).
I haven't figured out the problem yet, and I probably won't sweat it... it could be a template issue... The auto-inserted analytics code is displaying on the admin pages and every other HTML or PHP page.
<b>And that may be a problem... I don't really want my admin pages tracked by Google.</b> The nice thing about Google Analytics is that it tracks only your relevant content and legitimate visitors. Tailoring the logfile analysis tools to do the same thing is more difficult.
Also, a small criticism/correction: Analytics is misspelled Analyics (missing "t") most places in Virtualmin.
notice that "analytics" is spelled with a "t" ;¬)<br><br>Post edited by: PlayGod, at: 2007/12/21 15:24
<div class='quote'>Also, a small criticism/correction: Analytics is misspelled Analyics (missing "t") most places in Virtualmin. </div>
I believe this is fixed in the version of the module I rolled out a couple of days ago, but I'll double check.
--
Check out the forum guidelines!
Misspelled on "Edit Analyics Accounts" "Virtualmin Analyics" and in the checkbox choices on "Edit Virtual Server"
my v 1.5-1 is still reporting "Enabled but no account set" on "Virtualmin Analyics" page, though I have definitely enabled working accounts on several domains.
FYI
Webmin version 1.380
Virtualmin version 3.48 (Pro)
Operating system CentOS Linux 5
Apache version 2.2.3
PHP version 5
MySQL version 5.0.22
There is an update to the javascript code located on the google site.
will this new code be implemented soon?
here is a sample of the new code
old code:
[code:1]
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-XXXXX-1";
urchinTracker();
</script>
[/code:1]
new code:
[code:1]
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."«»);
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"«»));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXX-1"«»);
pageTracker._initData();
pageTracker._trackPageview();
</script>
[/code:1]
<div class='quote'>from google:
Use this tracking code to gain access to a wide range of exciting new features as they become availabl
</div>
<div class='quote'>as they become available</div>
So it's currently vaporware?
I'll take a look at my Analytics account next week to see if it's worth upgrading my urchins.
I would avoid this module anyway, it drops the urchin in every single html file rendered by the server, which is overkill and will give you more analytics results than you need.
It's really better to just put it in your page templates so it only shows up on the pages you want to track.
Anyone figure out a way to fix the fastcgi with php problem?
Mine works great with html sites... but my php sites don't connect.
http://www.virtualmin.com/index.php?option=com_flyspray&Itemid=82&am...
unless the prot://sub.domain.tld.path/name.ext of the js has changed, it should be automatic. The js call the module inserts is http://www.google-analytics.com/urchin.js
doesn't seem to work if you are using fastcgi with php
<div class='quote'>doesn't seem to work if you are using fastcgi with php</div>
That would be a bug. I dunno if it's one we can fix, but it's worth filing a ticket about it, just in case.
--
Check out the forum guidelines!
Hi Joe,
You need to update the URL for the wbm, as you reference v1.0 versus the current v1.7. Also is there an easier way to have webmin remember virtualmin URL to check for updates on these modules?
Thanks,
Charles
Some mobile handsets support the OMA download standard that sends a download descriptor file with a .dd extension to the mobile handset. The mobile handset then reads this file and makes a connection to collect the content specified in the file. Once the content is download to the handset the handset again looks at the file for any call back url to call and confirm that the content has been download fully.
My problem is that the GA plugin is appending its javascript to the .dd file sent to the handset. This file has a very strict standard and although some handsets ignore anything that comes after what the expect by the standard most will break.
So it would be nice if the GA plugin only appended the JS to recognized file extensions eg. .htm, .html, .php etc OR even better would be to add the functionality to have an exclusion list, maybe allow regexes, this could excluded all matching file extensions or even file that have copy that matches anything in the exclusion list etc?
Howdy,
Sounds like you may want to submit a feature request/bug report regarding that, so Jamie can take a look.
And then he can offer is what you're after is already possible -- or if it's not, he'll be able to work with you to figure out the best way to handle that.
Thanks!
-Eric
Server version: Apache/2.4.6 (CentOS) Server built: Aug 7 2014 14:28:12 Installed Packages Name : mod_perl Arch : x86_64 Version : 2.0.8 Release : 10.20140624svn1602105.el7 Size : 6.2 M Repo : installed From repo : epel
I have a question about Virtualmin Google Analytic module breaking my fancybox with:
setTimeout(‘document.location = “‘ + link.href + ‘”‘, 100);
Is there a way to edit the module so it inserts a different google standard tracking script that doesn't break fancybox?