From 161921909741e5b1b09f943069c2eb26f8032506 Mon Sep 17 00:00:00 2001 From: Stephane Bisson Date: Wed, 8 Dec 2021 04:12:05 -0500 Subject: [PATCH] Use a distinct wprov param for touch devices (#156) Co-authored-by: Stephane Bisson --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index a11b7583..e40c3cf3 100644 --- a/src/utils.js +++ b/src/utils.js @@ -66,7 +66,7 @@ const getDeviceSize = () => { return { height: window.innerHeight, width: window.innerWidth } } -const getAnalyticsQueryParam = () => 'wprov=wppw1' +const getAnalyticsQueryParam = () => 'wprov=wppw1' + ( isTouch ? 't' : '' ) const buildWikipediaUrl = ( lang, title, touch, analytics = true ) => { return `https://${lang}${touch ? '.m' : ''}.wikipedia.org/wiki/${encodeURIComponent( title )}${analytics ? `?${getAnalyticsQueryParam()}` : ''}`