r114189 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114188‎ | r114189 | r114190 >
Date:21:22, 19 March 2012
Author:rsterbin
Status:ok (Comments)
Tags:
Comment:
Updated clicktracking events to Phase 2 names
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
@@ -247,7 +247,7 @@
248248 <div class="articleFeedbackv5-form-flyover">\
249249 <div class="articleFeedbackv5-disable-flyover-help" >\
250250 <p class="articleFeedbackv5-disable-flyover-help-goto"></p>\
251 - <a class="articleFeedbackv5-disable-flyover-goto-link" target="_blank"><html:msg key="disable-flyover-help-location" /></a>\
 251+ <p>&quot;<html:msg key="disable-flyover-help-location" />&quot;</p>\
252252 <p><html:msg key="disable-flyover-help-direction" /></p>\
253253 <p>&quot;<html:msg key="disable-preference" />&quot;</p>\
254254 </div>\
@@ -457,7 +457,7 @@
458458 $block.find( '.articleFeedbackv5-submit' )
459459 .click( function ( e ) {
460460 e.preventDefault();
461 - $.articleFeedbackv5.trackClick( 'option1-submit-' +
 461+ $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-submit-' +
462462 ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ) );
463463 $.articleFeedbackv5.submitForm();
464464 } );
@@ -714,7 +714,7 @@
715715 $block.find( '.articleFeedbackv5-submit' )
716716 .click( function ( e ) {
717717 e.preventDefault();
718 - $.articleFeedbackv5.trackClick( 'option2-submit-' +
 718+ $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-submit-' +
719719 ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ) );
720720 $.articleFeedbackv5.submitForm();
721721 } );
@@ -1042,7 +1042,7 @@
10431043 $block.find( '.articleFeedbackv5-submit' )
10441044 .click( function ( e ) {
10451045 e.preventDefault();
1046 - $.articleFeedbackv5.trackClick( 'option3-submit-' +
 1046+ $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + 'submit-' +
10471047 ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ) );
10481048 $.articleFeedbackv5.submitForm();
10491049 } );
@@ -3006,7 +3006,7 @@
30073007 * @return string the bucket name
30083008 */
30093009 $.articleFeedbackv5.bucketName = function () {
3010 - return 'option' + $.articleFeedbackv5.bucketId;
 3010+ return 'option' + $.articleFeedbackv5.bucketId + $.articleFeedbackv5.floatingLinkId;
30113011 };
30123012
30133013 // }}}
@@ -3546,24 +3546,28 @@
35473547 $flyover.localize( { 'prefix': 'articlefeedbackv5-' } );
35483548 $flyover.find( '.articleFeedbackv5-disable-flyover' )
35493549 .addClass( 'articleFeedbackv5-disable-flyover-' + linkId );
3550 - var prefLink = mw.config.get( 'wgScript' ) + '?' +
3551 - $.param( { title: 'Special:Preferences' } ) +
3552 - '#mw-prefsection-rendering';
 3550+
35533551 $flyover.find( '.articleFeedbackv5-disable-flyover-help-goto' )
35543552 .html( $.articleFeedbackv5.buildLink(
35553553 'articlefeedbackv5-disable-flyover-help-goto', {
35563554 tag: 'strong',
35573555 text: 'articlefeedbackv5-disable-flyover-help-emphasis-text'
35583556 } ) );
3559 - $flyover.find( '.articleFeedbackv5-disable-flyover-goto-link' )
3560 - .attr( 'href', prefLink )
 3557+
 3558+ var prefLink = mw.config.get( 'wgScript' ) + '?' +
 3559+ $.param( { title: 'Special:Preferences' } ) +
 3560+ '#mw-prefsection-rendering';
 3561+ var prefTrackId = $.articleFeedbackv5.bucketName() + '-disable_gotoprefs_click';
35613562 $flyover.find( '.articleFeedbackv5-disable-flyover-button' )
3562 - .attr( 'href', prefLink )
 3563+ .attr( 'href', $.articleFeedbackv5.trackingUrl( prefLink, prefTrackId ) )
35633564 .button()
35643565 .addClass( 'ui-button-blue' );
 3566+
35653567 $flyover.find('.articleFeedbackv5-form-flyover-closebutton')
35663568 .attr( 'href', '#hello' )
35673569 .attr( 'rel', linkId );
 3570+
 3571+ $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-disable_flyover-impression' );
35683572 return $flyover.html();
35693573 }
35703574 } )
@@ -3577,6 +3581,7 @@
35783582 } else {
35793583 $host.tipsy( 'show' );
35803584 $wrap.addClass( 'articleFeedbackv5-tipsy-active' );
 3585+ $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-disable_button_click' );
35813586 }
35823587 } );
35833588 };

Comments

#Comment by Rsterbin (talk | contribs)   21:26, 19 March 2012

Also dropped the extra prefs link from the flyover -- should have mentioned that in the commit message. D'oh.

Status & tagging log