Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Piwik as a self serve hosted web analytics solution #1148

mattab opened this Issue · 42 comments

5 participants

Matthieu Aubry Anonymous Piwik user Maciej Zawadziński Anthon Pang Fabian Becker
Matthieu Aubry

Is is a very common feature request that users want to have their Piwik as a self serve tool where new users can register themselves and existing users can add new websites.

This ticket is a placeholder to gather requirements on such a feature. We don't plan to implement this in Piwik 1.0 but there might be enough interested users & developers to get this feature built and integrated in core.

List of features:

  • Below the login screen, a new link to "Register".
  • The Register screen would contain the standard field (login, password, email, name) using the login screen html/css styles. During registration, a user would also setup their first website (website name, URL).
  • Once the registration is complete (directly or after validation by the Piwik super user), the user can access the Piwik interface and get the Javascript tag.


  • A user creating a website would be "admin" for this website. He can create other users and give them access to the stats.
  • New setting: Allow users to register themselves and create websites Y/N
  • New setting: Allow existing users to create new websites Y/N

Outstanding questions

  • We need to ensure that users providing a self hosted Piwik do not use the Piwik and rebrand their offering.
  • if one was to bill for the service, how would this be handled?
  • if a large website comes in and adds the Piwik tag, this would severely impact/break other websites' performance. How is this handled? Some sort of security in the tracker is necessary to block all new writes from a website that is using too much resource.

Please post your thoughts and new requirements in a comment to this ticket. Also if you are interested to build this feature, post a comment.

Want this feature implemented and released in Piwik?

Contact a Piwik consultant today!
Keywords: self, hosted, hosted, register, registration, service, third-party-plugin

Anonymous Piwik user

maybe its possible to limit the traffic to websites for tracking, that you can say, a specific website should not exceed 10000 users per day, and if so, the tracking should be simply disabled and the owner notified.

i would like to see this feature for piwik!

Anonymous Piwik user

Limit the number of websites a user can create. So, admin can set up a number (per user) to which the user can create websites. If the number is zero then it is unlimited.

Maciej Zawadziński

attaching signup plugin + patch for lang/en.php and config/ files (there is an option to enable/disable captcha).

Currently the plugin does not add a link to Login form, so in order to see the signup form call directly: index.php?module=Signup

Maciej Zawadziński

setting it as a new plugin (some people asked me for it, so let's put it in the plugin directory before it gets into core)

Anonymous Piwik user

Does this still work with 1.1? I am getting some template errors when I navigate to the signup page.

I get the following errors:

Notice: Undefined index: enableFramedLogins in /home/a389951l/public_html/piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php on line 14

Matthieu Aubry

a389951l, can you try and delete your /home/a389951l/public_html/piwik/tmp/templates_c files and refresh? please report if you still see the error

Anthon Pang

Signup_Controller needs to set the missing variables used by the login template. See

Anonymous Piwik user

Matt - I tried to delete the templates_c files and I still get the errors.

Replying to matt:

a389951l, can you try and delete your /home/a389951l/public_html/piwik/tmp/templates_c files and refresh? please report if you still see the error

Matthieu Aubry

See also 'Logo customize' feature request: #2008

Anonymous Piwik user

Hi vipsoft and matt
I have a same problem:
Matt - I tried to delete the templates_c files and I still get the errors.
vipsoft - I change Signup_Controller.

Matthieu Aubry

(In [3854]) Refs #1148 Prevent error in Signup plugin in 1.1.1

Matthieu Aubry

a389951l and akonews, please apply the patch in: [3854] and this fixes the error message. Don't forget to also apply the patch listed in this ticket:

Matthieu Aubry

There is an error in the SignUp plugin JS code sent by email:,73661

Anonymous Piwik user

After signing-up, the Javascript code displayed is sort of garbled. The same code is then sent by email to the user and is, again, received garbled.


(a) File Signup/templates/success.tpl - line 17, remove [ |escape:'htmlall' ] from the line

(b) Edit the language file to disable sending the code in mail. Instead instruct users to get it from the Dashboard. This is in the additional language added for Sign up.

Edit 'Signup_MailBody' to look like this:

'Signup_MailBody' => "Hi %1\$s!\n\nYou have successfully signed up for an account. \n\nYour Username:\t%2\$s\nYour Password:\t%3\$s\nLogin URL:\t%4\$s\n\nTo count all visitors, you must insert the JavaScript code available inside your Dashboard: Settings > Websites > View Tracking Code.\n\nSincerely,\nPiwik Open Source Analytics%5",

Matthieu Aubry

ssgupta, if you could post the updated ZIP including these fixes it would be useful thanks!

Anonymous Piwik user

there is another problem! I want that my users will be able to add more websites. Now new users can have only one website. How I can change that?

Anonymous Piwik user

Error in Signup page after update Piwik 1.4 --> 1.5.

There is an error. Please report the message and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Notice: Undefined index: isCustomLogo in /home/director/public_html/Piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php on line 78

Backtrace -->
#0 Piwik_ErrorHandler(8, 1 => 'Undefined index: isCustomLogo', 2 => '/home/director/public_html/Piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php', 3 => 78, 4 => array ('this' => Piwik_Smarty::__set_state(array('template_dir' => array (0 => '/home/director/public_html/Piwik/plugins', 1 => '/home/director/public_html/Piwik/themes/default', 2 => '/home/director/public_html/Piwik/themes'), 'compile_dir' => '/home/director/public_html/Piwik/tmp/templates_c', 'config_dir' => 'configs', 'plugins_dir' => array (0 => '/home/director/public_html/Piwik/core/SmartyPlugins', 1 => '/home/director/public_html/Piwik/libs/Smarty/plugins'), 'debugging' => false, 'error_reporting' => '6143', 'debug_tpl' => '', 'debugging_ctrl' => 'NONE', 'compile_check' => true, 'force_compile' => false, 'caching' => 0, 'cache_dir' => '/home/director/public_html/Piwik/tmp/cache', 'cache_lifetime' => 3600, 'cache_modified_check' => false, 'php_handling' => 0, 'security' => false, 'secure_dir' => array (), 'securit...#1 include('/home/director/public_html/Piwik/tmp/templates_c/%%A9^A91^A917CA4A%%header.tpl.php') called at [Smarty->_smarty_include(array ('smarty_include_tpl_file' => 'Login/templates/header.tpl', 'smarty_include_vars' => array ())) called at /home/director/public_html/Piwik/tmp/templates_c/%%6E^6E8^6E83E5D4%%register.tpl.php:6#3 include('/home/director/public_html/Piwik/tmp/templates_c/%%6E^6E8^6E83E5D4%%register.tpl.php') called at [Smarty->fetch('/home/director/public_html/Piwik/plugins/Signup/templates/register.tpl') called at /home/director/public_html/Piwik/core/View.php:138#5 Piwik_View->render(array () called at [Piwik_Signup_Controller->register(array () called at /home/director/public_html/Piwik/plugins/Signup/Controller.php:19#7 Piwik_Signup_Controller->index(array () called at [call_user_func_array(array (0 => Piwik_Signup_Controller::__set_state(array('pluginName' => 'Signup', 'strDate' => NULL, 'date' => NULL, 'idSite' => 0, 'site' => Piwik_Site::__set_state(array('id' => 0)))), 1 => 'index'), 1 => array ()) called at /home/director/public_html/Piwik/core/FrontController.php:127#9 Piwik_FrontController->dispatch(array () called at [/home/director/public_html/Piwik/index.php:53]

What can I do?


Anthon Pang

In Signup/Controller.php, insert
before the two occurences
echo $view->render();

Anonymous Piwik user

Anyone get this thing working? I have tried running the "patch" command to for the patch file but it just fails. What files do you actually edit if you were to do it manually. This is the code from the patch:

Index: config/global.ini.php
--- config/global.ini.php   (revision 3324)
+++ config/global.ini.php   (working copy)
@@ -55,6 +55,9 @@
 ; this option must be set to 1 when adding, removing or modifying javascript and css files
 disable_merged_assets = 0

+enable_captcha = 0
 ; character used to automatically create categories in the Actions > Pages, Outlinks and Downloads reports
 ; for example a URL like "" will create 
Index: lang/en.php
--- lang/en.php (revision 3324)
+++ lang/en.php (working copy)
@@ -1191,4 +1191,13 @@
    'PDFReports_AreYouSureYouWantToDeleteReport' => 'Are you sure you want to delete this PDF Report and its schedule?',
    'PDFReports_ThereIsNoPDFReportToManage' => 'There is no PDF Report to manage for website %s',
    'PDFReports_YouMustBeLoggedIn' => 'You must be logged in to create and schedule custom PDF Reports.',
+   'Signup_InvalidWebsiteURL' => 'Invalid website URL. Enter full URL with http:// prefix.',
+   'Signup_Captcha' => 'Enter text from image above',
+   'Signup_InvalidCaptcha' => 'Invalid text from image.',
+   'Signup_Signup' => 'Sign up',
+   'Signup_Intro' => 'Please fill this form to sign up for Piwik account.',
+   'Signup_ProceedDashboard' => 'Proceed to Dashboard',
+   'Signup_CompleteMessage' => 'Sign up complete!<br /><br />Make sure your JavaScript code is entered on your pages, and wait for your first visitors!<br /><br />We will receive an email with confirmation shortly.',
+   'Signup_MailSubject' => 'Signup complete',
+   'Signup_MailBody' => "Hi %1\$s,\n\nYou have successfully sign up for Piwik account. \n\n Your username:\t%2\$s\n Your password: \t%3\$s\n Login URL: \t%4\$s\n\nTo count all visitors, you must insert the JavaScript code (below) on all of your pages.\n\n%5\$s",

Also, what do you do with the "signup-language.txt" file? I should probably be able to figure this out but for some reason have not been able too.

I hope to see this plugin in 1.6!

Matthieu Aubry

We hope to fix the few bugs and add a few features in this plugin in the next few weeks. Stay tuned!

Matthieu Aubry

See also ideas of settings in: #1568

Anonymous Piwik user

Hello, i would install this singup, but i have only error. can any body me help.


dear sven

Anonymous Piwik user

So is this plugin working?

Anonymous Piwik user

No, piwik work yes, but not this creat tool :-)

Anonymous Piwik user

Shame, Piwik will always be a backup analytics tool without having a self serve option

Anonymous Piwik user

Hi everyone!
I was writing about this plugin for a book I am writing on Piwik and realized that I had to read the whole thread to get the plugin working. So I put together all the changes and have a working signup form on my site. I also added a README file for those people that don't know how to use the patch files and zipped it together to upload here, just to make it easier on the next guy and to finish the chapter I had time invested in.

Anonymous Piwik user

And that new upload was working in 1.7.1. The 1.17 number was a typo.

Matthieu Aubry

eristoddle, thank you very much for posting the updated version of the plugin!

If anyone is using the plugin with success or have any feedback, please post a comment.

Anonymous Piwik user

I just added a new version.

  • Readme now says to edit config.ini.php and not global.ini.php
  • Success form no longer escapes your tracking code which made it useless.
Anonymous Piwik user

Oh, and this works up to 1.8.3.

Matthieu Aubry

Thanks @eristoddle for the update.

Note: I deleted the other old files and only put up the latest version to keep things simple!

Matthieu Aubry

Oops I deleted the translation patch.

instead the translation en.php should be in the lang/ folder of the plugin Signup/lang/

and the plugin getInformation() function should contain 'translationAvailable' => true, to have piwik pick up this translation file.

If someone would be willing to update & test it would be great!

'Signup_InvalidWebsiteURL' => 'Invalid Website URL. Enter full URL
with http:// prefix.',
'Signup_Captcha' => 'Enter text from image above',
'Signup_InvalidCaptcha' => 'Invalid text from image.',
'Signup_Signup' => 'Sign Up',
'Signup_Intro' => 'Please fill this form to sign up for an
'Signup_ProceedDashboard' => 'Proceed to Dashboard',
'Signup_CompleteMessage' => 'Sign up Complete!<br /><br />Make
sure your JavaScript code is entered in your pages, and wait for
your first visitors.<br /><br />You will receive an email with
confirmation shortly.',
'Signup_MailSubject' => 'Signup Complete',
'Signup_MailBody' => "Hi %1\$s!\n\nYou have successfully signed up
for an account. \n\nYour Username:\t%2\$s\nYour
Password:\t%3\$s\nLogin URL:\t%4\$s\n\nTo count all visitors, you
must insert the JavaScript code available inside your Dashboard:
Settings > Websites > View Tracking Code.\n\nSincerely,\nPiwik
Open Source Analytics%5",

Anonymous Piwik user

I updated the plugin with it's own en.php file.

Matthieu Aubry

Attachment: New plugin to allow users to signup to Piwik!

Anonymous Piwik user

Piwik 1.8.4 don't work with GeoIp and Signup widgets (fresh install).
What changes should be made to the widgets that work with Piwik 1.8.4 ?

Anonymous Piwik user

Tested on Piwik 1.9.2, everything else works, except this plugin. NO sign up form appears, or anything else.
I installed it as per the instructions included in your readme. Do you know when a working version will be released? I'd even be interested in a working alpha or beta version ;-)


Fabian Becker

For future changes please refer to the repository by Stephan on Github:

Anonymous Piwik user

I get this plugin worked when rename folder to Signup, this is necessary by plugin convention. Registration form is accessible by register url index.php?module=Signup&action=index . For example http://localhost/index.php?module=Signup&action=index . I cannot find some login form/page hook for extending it with some register link and maybe we should change the login template (ugly approach)

Anonymous Piwik user


When I installed the plugin on piwik 1.11.1 , Tracking for all websites be disabled !!!

please help

thank you

Anonymous Piwik user

Not working in V2.0 !

Matthieu Aubry

Thank you everyone for your feedback on the plugin. Currently I believe this plugin is not working with Piwik 2.0. We would be happy to update it for you. Please contact us via:

In the meantime, we hope you enjoy Piwik! Cheers

Matthieu Aubry mattab added the R: worksforme label
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.