--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_measure_registration/README.markdown Sat Mar 21 15:03:47 2020 +0100
@@ -0,0 +1,11 @@
+---
+labels:
+- Statistics
+summary: Collect statistics on user registration
+---
+
+Description
+===========
+
+This module measures the rate at which users register on the server (through
+providers like `mod_register_ibr` or `mod_register_web`).
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_measure_registration/mod_measure_registration.lua Sat Mar 21 15:03:47 2020 +0100
@@ -0,0 +1,10 @@
+local count_registering = module:measure("user_registering", "rate");
+local count_registered = module:measure("user_registered", "rate");
+
+module:hook("user-registering", function ()
+ count_registering();
+end);
+
+module:hook("user-registered", function ()
+ count_registered();
+end);