Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js |
— | — | @@ -290,15 +290,20 @@ |
291 | 291 | 'action': function() { |
292 | 292 | // Mute for 7 days |
293 | 293 | mutePitch( 'edit', 7 ); |
294 | | - // Go to edit page |
295 | | - // Track the click through an API redirect |
| 294 | + // Setup edit page link |
| 295 | + var params = { |
| 296 | + 'title': mw.config.get( 'wgPageName' ), |
| 297 | + 'action': 'edit' |
| 298 | + }; |
| 299 | + if ( tracked ) { |
| 300 | + // Keep track of tracked users' edits |
| 301 | + params.clicktrackingsession = $.cookie( 'clicktracking-session' ); |
| 302 | + params.clicktrackingevent = prefix( 'pitch-edit-save' ); |
| 303 | + } |
| 304 | + // Track the click through an API redirect (automatically bypasses if !tracked) |
296 | 305 | window.location = trackClickURL( |
297 | | - mw.config.get( 'wgScript' ) + '?' + $.param( { |
298 | | - 'title': mw.config.get( 'wgPageName' ), |
299 | | - 'action': 'edit', |
300 | | - 'clicktrackingsession': $.cookie( 'clicktracking-session' ), |
301 | | - 'clicktrackingevent': prefix( 'pitch-edit-save' ) |
302 | | - } ), 'pitch-edit-accept' ); |
| 306 | + mw.config.get( 'wgScript' ) + '?' + $.param( params ), 'pitch-edit-accept' |
| 307 | + ); |
303 | 308 | return false; |
304 | 309 | }, |
305 | 310 | 'title': 'articlefeedback-pitch-thanks', |