Skip to content

Commit

Permalink
Use a distinct wprov param for touch devices (#156)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephane Bisson <[email protected]>
  • Loading branch information
stephanebisson and Stephane Bisson authored Dec 8, 2021
1 parent e5d89d3 commit 1619219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()}` : ''}`
Expand Down

0 comments on commit 1619219

Please sign in to comment.