Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/214663
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(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents
refs/changes/63/214663/1
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/214663
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib61cd546ab8e70f252360ad22e6befecc38c6236
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.26wmf7
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits