Problems with Google Analytics Module

some users have been needing some more advanced Analytics, so I decided to install the Google Analytics Virtualmin module.

I installed it, and then enabled it in the plugin and features panel.

When I went to their account to configure it using the "Analytics Account" link in the services section, it says:

[code:1]This server does not have analyics tracking enabled[/code:1]

Okay, maybe because I just enabled it on the system, it isn’t on their accounts, even though I set it as a default option in the plugin and features settings. I go to Edit Virtual Server for their account, and check the enabled features and the Analytics feature is enabled.

Okay, lets remove the feature and then re-add it. That way maybe the enabler script will configure their account properly.

When I try to disable that feature, I get the following error after I agree to ddisable the feature:

[code:1]Failed to modify server : flush_file_lines called on non-loaded file /etc/apache2/vhosts.d/thedomain.com.conf[/code:1]

What’s going on here?

And then if I click on the "Return to Previous Page" link, I then get the error:

[code:1]Failed to modify server : Missing or invalid total quota[/code:1]

The quotas are enabled and within range for this account, I even checked it.

Do I have to uninstall the plugin and reinstall it? Does it have anything to do with the fact that I upgraded to Webmin 1.4 within the last week?

I was able to fix it. I went into the account configuration file at /etc/webmin/virtual-server/domains/somenumber

There was a line that said

[code:1]virtualmin-google-analytics=1[/code:1]

I just changed it to

[code:1]virtualmin-google-analytics=0[/code:1]

And then I was able to go into the Virtual Server settings and enable the feature without any problem.

Can we have the feature plugins properly run an install on the virtual servers if it is enabled and set to default? Or is this probably caused by some screwy configuration that got left behind?