Opened 4 years ago

Closed 2 months ago

Last modified 4 weeks ago

#1148 closed New feature (answered)

Piwik as a self serve hosted web analytics solution

Reported by: matt Owned by:
Priority: major Milestone:
Component: Plugins Wishlist Keywords: self, hosted, hosted, register, registration, service, third-party-plugin
Cc: Sensitive: no

Description (last modified by matt)

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.

Notes

  • 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! http://piwik.org/consulting/

Attachments (1)

Signup.zip (101.2 KB) - added by matt 19 months ago.
New plugin to allow users to signup to Piwik!

Download all attachments as: .zip

Change History (48)

comment:1 Changed 4 years ago by matt (mattab)

  • Description modified (diff)

comment:2 Changed 4 years ago by vipsoft (robocoder)

  • Type changed from Bug to New feature

comment:3 Changed 4 years ago by bascorp

comment:4 Changed 4 years ago by easteregg

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!

comment:5 Changed 4 years ago by gossi

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.

comment:6 Changed 3 years ago by matt (mattab)

  • Description modified (diff)

comment:7 Changed 3 years ago by mauser (zawadzinski)

attaching signup plugin + patch for lang/en.php and config/global.inc.php 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

comment:8 Changed 3 years ago by mauser (zawadzinski)

  • Component changed from Core to New Plugin

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)

comment:9 Changed 3 years ago by a389951l

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/%%A9A91A917CA4A%%header.tpl.php on line 14

comment:10 follow-up: Changed 3 years ago by matt (mattab)

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

comment:11 Changed 3 years ago by vipsoft (robocoder)

Signup_Controller needs to set the missing variables used by the login template. See http://dev.piwik.org/trac/browser/trunk/plugins/Login/Controller.php

comment:12 in reply to: ↑ 10 Changed 3 years ago by a389951l

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

comment:13 Changed 3 years ago by matt (mattab)

See also 'Logo customize' feature request: #2008

comment:14 Changed 3 years ago by akonews

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

comment:15 Changed 3 years ago by matt (mattab)

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

comment:16 Changed 3 years ago by matt (mattab)

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: http://dev.piwik.org/trac/attachment/ticket/1148/signup.patch

comment:17 Changed 3 years ago by matt (mattab)

There is an error in the SignUp plugin JS code sent by email: http://forum.piwik.org/read.php?2,73661

comment:18 Changed 3 years ago by ssgupta

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.

Fix:

(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",

comment:19 Changed 3 years ago by matt (mattab)

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

comment:20 Changed 3 years ago by drwogman

Hello,
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?

comment:21 Changed 3 years ago by razvan1958

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/%%A9A91A917CA4A%%header.tpl.php on line 78

Backtrace -->
#0 Piwik_ErrorHandler(8, 1 => 'Undefined index: isCustomLogo', 2 => '/home/director/public_html/Piwik/tmp/templates_c/%%A9A91A917CA4A%%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/%%A9A91A917CA4A%%header.tpl.php') called at home/director/public_html/Piwik/libs/Smarty/Smarty.class.php:1869#2 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/%%6E6E86E83E5D4%%register.tpl.php') called at home/director/public_html/Piwik/libs/Smarty/Smarty.class.php:1263#4 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 home/director/public_html/Piwik/plugins/Signup/Controller.php:54#6 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 [:]#8 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?

Razvan

comment:22 Changed 3 years ago by vipsoft (robocoder)

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

comment:23 Changed 3 years ago by JMETERX

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
 
+[Signup]
+enable_captcha = 0
+
 [General]
 ; character used to automatically create categories in the Actions > Pages, Outlinks and Downloads reports
 ; for example a URL like "example.com/blog/development/first-post" 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!

comment:24 Changed 3 years ago by matt (mattab)

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

comment:26 Changed 2 years ago by sesam

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

email: support@…

dear sven

comment:27 Changed 2 years ago by seolegion

So is this plugin working?

comment:28 Changed 2 years ago by sesam

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

comment:29 Changed 2 years ago by seolegion

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

comment:30 Changed 23 months ago by eristoddle

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.

comment:31 Changed 23 months ago by eristoddle

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

comment:32 Changed 23 months ago by matt (mattab)

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.

comment:33 Changed 20 months ago by eristoddle

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.

comment:34 Changed 20 months ago by eristoddle

Oh, and this works up to 1.8.3.

comment:35 Changed 19 months ago by matt (mattab)

Thanks @eristoddle for the update.

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

comment:36 Changed 19 months ago by matt (mattab)

  • Milestone changed from Feature requests to Third Party Piwik Plugins

comment:37 Changed 19 months ago by matt (mattab)

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
account.',
'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",

comment:38 Changed 19 months ago by eristoddle

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

Changed 19 months ago by matt (mattab)

New plugin to allow users to signup to Piwik!

comment:39 Changed 19 months ago by razvan1958

Hello,
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 ?

comment:40 Changed 16 months ago by k0nsl

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 ;-)

-k0nsl

comment:41 Changed 14 months ago by halfdan

For future changes please refer to the repository by Stephan on Github: https://github.com/eristoddle/PiwikSignupPlugin

comment:42 Changed 13 months ago by Neo2SHYAlien

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)

comment:43 Changed 11 months ago by mehdi.gpr

hi

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

please help

thank you

comment:44 Changed 4 months ago by galiver

Not working in V2.0 !

comment:45 Changed 2 months ago by matt (mattab)

  • Resolution set to answered
  • Status changed from new to closed

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: http://piwik.org/consulting/

In the meantime, we hope you enjoy Piwik! Cheers

comment:46 Changed 2 months ago by matt (mattab)

  • Keywords third-party-plugin added

Adding third-party-plugin tag to all Piwik 1.x third party plugins. For more information, please visit the Developer docs, the Plugins Marketplace, the themes Marketplace and see #4607

If you have any question or feedback, get in touch in our Piwik developers forum. Happy new year 2014!

comment:47 Changed 2 months ago by matt (mattab)

  • Milestone Third Party Piwik Plugins deleted

Milestone Third Party Piwik Plugins deleted

Note: See TracTickets for help on using tickets.