jenkins-bot has submitted this change and it was merged.
Change subject: Report time to first edit as `ttfe`
......................................................................
Report time to first edit as `ttfe`
The time that elapses between a user creating an account and that same user
making her first edit is a good indicator of how good a job we are doing at
being encouraging, welcoming and comprehensible to new users.
One common web performance metric is "TTFB", or time-to-first-byte. This, then,
is "TTFE", or time-to-first-edit.
Bug: T99060
Change-Id: Ib61cd546ab8e70f252360ad22e6befecc38c6236
(cherry picked from commit 8991081bd0416b689be525ba006bf371e846ddf8)
---
M WikimediaEventsHooks.php
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Ori.livneh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index e777996..c159a21 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -85,9 +85,15 @@
// Get the user's age, measured in seconds since registration.
$age = time() - wfTimestampOrNull( TS_UNIX,
$user->getRegistration() );
- // Get the user's edit count.
$editCount = $user->getEditCount();
+ if ( $editCount === 0 ) {
+ // It's the user's first edit! Report the time elapsed
since the
+ // user registered as "ttfe" ("time to first edit").
+ $stats = RequestContext::getMain()->getStats();
+ $stats->timing( 'ttfe', $age );
+ }
+
// If the editor signed up in the last thirty days, and if this
is an
// NS_MAIN edit, log a NewEditorEdit event.
if ( $age <= 2592000 && $title->inNamespace( NS_MAIN ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/214662
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib61cd546ab8e70f252360ad22e6befecc38c6236
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.26wmf8
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits