r106267 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106266‎ | r106267 | r106268 >
Date:22:30, 14 December 2011
Author:rsterbin
Status:ok
Tags:
Comment:
Tweaks to tracking ids for bug #32992:
- modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js:
- The vertical link now has its own tracking id
- Made bucketName() outside-accessible
- modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js:
- Added bucket name to link events
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
@@ -1902,7 +1902,8 @@
19031903 .attr( 'href', mw.msg( 'articlefeedbackv5-cta1-learn-how-url' ) );
19041904
19051905 // Fill in the link
1906 - var edit_track_id = $.articleFeedbackv5.ctaName() + '-button-click-' +
 1906+ var edit_track_id = $.articleFeedbackv5.bucketName() + '-' +
 1907+ $.articleFeedbackv5.ctaName() + '-button-click-' +
19071908 ( $.articleFeedbackv5.inDialog ? 'overlay': 'bottom' );
19081909 $block.find( '.articleFeedbackv5-cta-button' )
19091910 .attr( 'href', $.articleFeedbackv5.editUrl( edit_track_id ) );
@@ -1968,7 +1969,8 @@
19691970
19701971 // Fill in the button link
19711972 var learn_url = mw.msg( 'articlefeedbackv5-cta1-learn-how-url' );
1972 - var learn_track_id = $.articleFeedbackv5.ctaName() + '-button-click-' +
 1973+ var learn_track_id = $.articleFeedbackv5.bucketName() + '-' +
 1974+ $.articleFeedbackv5.ctaName() + '-button-click-' +
19731975 ( $.articleFeedbackv5.inDialog ? 'overlay': 'bottom' );
19741976 $block.find( '.articleFeedbackv5-cta-button' )
19751977 .attr( 'href', $.articleFeedbackv5.trackingUrl( learn_url, learn_track_id ) );
@@ -2656,7 +2658,8 @@
26572659 $.articleFeedbackv5.setDialogDimensions();
26582660
26592661 // Track the event
2660 - $.articleFeedbackv5.trackClick( $.articleFeedbackv5.ctaName() + '-impression-' +
 2662+ $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-' +
 2663+ $.articleFeedbackv5.ctaName() + '-impression-' +
26612664 ( $.articleFeedbackv5.inDialog ? 'overlay' : 'bottom' ) );
26622665
26632666 $.articleFeedbackv5.nowShowing = 'cta';
@@ -2911,7 +2914,8 @@
29122915 if ( 'form' == $.articleFeedbackv5.nowShowing ) {
29132916 $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-overlay-close' );
29142917 } else if ('cta' == $.articleFeedbackv5.nowShowing ) {
2915 - $.articleFeedbackv5.trackClick( $.articleFeedbackv5.ctaName() + '-overlay-close' );
 2918+ $.articleFeedbackv5.trackClick( $.articleFeedbackv5.bucketName() + '-' +
 2919+ $.articleFeedbackv5.ctaName() + '-overlay-close' );
29162920 }
29172921 $.articleFeedbackv5.setLinkId( '0' );
29182922 $.articleFeedbackv5.$dialog.find( '.articleFeedbackv5-tooltip' ).hide();
@@ -2979,6 +2983,7 @@
29802984 inDebug: { args: 0, ret: true },
29812985 nowShowing: { args: 0, ret: true },
29822986 prefix: { args: 1, ret: true },
 2987+ bucketName: { args: 0, ret: true },
29832988 addToRemovalQueue: { args: 1, ret: false },
29842989 openAsModal: { args: 1, ret: false },
29852990 closeAsModal: { args: 0, ret: true },
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js
@@ -28,7 +28,9 @@
2929
3030 // Click event
3131 var clickFeedbackLink = function ( $link ) {
32 - $aftDiv.articleFeedbackv5( 'trackClick', linkInfo[ $link.data( 'linkId' ) ].trackId );
 32+ var tracking_id = $aftDiv.articleFeedbackv5( 'bucketName' ) +
 33+ linkInfo[ $link.data( 'linkId' ) ].trackId;
 34+ $aftDiv.articleFeedbackv5( 'trackClick', tracking_id );
3335 $aftDiv.articleFeedbackv5( 'openAsModal', $link );
3436 };
3537

Follow-up revisions

RevisionCommit summaryAuthorDate
r106268Tweak for bug #32992 -- renamed learn-more cta to learnmorersterbin22:36, 14 December 2011
r106469Added edit tracking and tweaked tracking ids for bug #32992:...rsterbin19:40, 16 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106251First pass addressing bug #32992:...rsterbin22:06, 14 December 2011

Status & tagging log