Track links shared by Share feature

Apply provenance parameter to all shared links via Share api.

Bug: T207280
Change-Id: I175dcd45bd25f6ed21f06eeecfc22d97bd5a210a
This commit is contained in:
Piotr Miazga 2019-03-15 22:46:54 +01:00
parent 9038122c6f
commit 8a844a9699
1 changed files with 4 additions and 1 deletions

View File

@ -9,10 +9,13 @@
*/
function clickShareHandler( navigator ) {
return function () {
var url = new URL( window.location.href );
url.searchParams.append( 'wprov', 'mfsw1' );
url.searchParams.delete( 'debug' );
navigator.share( {
title: config.get( 'wgTitle' ),
text: config.get( 'wgTitle' ),
url: window.location.href.split( '#' )[ 0 ]
url: url.toString()
} );
};
}