Index: trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationUtil.php |
— | — | @@ -24,8 +24,9 @@ |
25 | 25 | * Track the page stats to the special article creation landing page |
26 | 26 | * @param $request Object |
27 | 27 | * @param $user Object |
| 28 | + * @param $par string - the title for the non-existing article |
28 | 29 | */ |
29 | | - public static function TrackSpecialLandingPage( $request, $user ) { |
| 30 | + public static function TrackSpecialLandingPage( $request, $user, $par ) { |
30 | 31 | if ( $user->isAnon() ) { |
31 | 32 | $event = 'landingpage-anonymous'; |
32 | 33 | } else { |
— | — | @@ -38,15 +39,16 @@ |
39 | 40 | } |
40 | 41 | } |
41 | 42 | |
42 | | - self::clickTracking( $event, SpecialPage::getTitleFor( 'ArticleCreationLanding' ) ); |
| 43 | + self::clickTracking( $event, SpecialPage::getTitleFor( 'ArticleCreationLanding' ), $par ); |
43 | 44 | } |
44 | 45 | |
45 | 46 | /** |
46 | 47 | * Tracking code that calls ClickTracking |
47 | 48 | * @param $event string the event name |
48 | 49 | * @param $title Object |
| 50 | + * @param $info string - additional info for click tracking |
49 | 51 | */ |
50 | | - private static function clickTracking( $event, $title ) { |
| 52 | + private static function clickTracking( $event, $title, $info = '' ) { |
51 | 53 | // check if ClickTracking API is enabled |
52 | 54 | if ( !self::trackingEnabled() ) { |
53 | 55 | return; |
— | — | @@ -56,7 +58,8 @@ |
57 | 59 | 'action' => 'clicktracking', |
58 | 60 | 'eventid' => self::trackingCodePrefix() . $event, |
59 | 61 | 'token' => wfGenerateToken(), |
60 | | - 'namespacenumber' => $title->getNamespace() |
| 62 | + 'namespacenumber' => $title->getNamespace(), |
| 63 | + 'additional' => $info |
61 | 64 | ) ); |
62 | 65 | $api = new ApiMain( $params, true ); |
63 | 66 | $api->execute(); |
Index: trunk/extensions/ArticleCreationWorkflow/SpecialArticleCreationLanding.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | $wgOut->addModules( 'ext.articleCreation.user' ); |
36 | 36 | $wgOut->addHtml( ArticleCreationTemplates::getLandingPage($par) ); |
37 | 37 | |
38 | | - ArticleCreationUtil::TrackSpecialLandingPage( $wgRequest, $wgUser ); |
| 38 | + ArticleCreationUtil::TrackSpecialLandingPage( $wgRequest, $wgUser, $par ); |
39 | 39 | } |
40 | 40 | |
41 | 41 | } |