AndyRussG has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/334410 )
Change subject: Add region URL param to beacon/impression
......................................................................
Add region URL param to beacon/impression
Bug: T156399
Change-Id: Ieb9966614bd4cf219a2d563efdc89f1b8bbd5769
---
M resources/subscribing/ext.centralNotice.display.state.js
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice
refs/changes/10/334410/1
diff --git a/resources/subscribing/ext.centralNotice.display.state.js
b/resources/subscribing/ext.centralNotice.display.state.js
index 2d18e1f..f3f5012 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -109,9 +109,11 @@
state.data.uselang = mw.config.get( 'wgUserLanguage' );
state.data.device = urlParams.device || getDeviceCode();
- // data.country should already have been set
+ // data.country and data.region should already have been set
state.data.country = urlParams.country || state.data.country ||
UNKNOWN_COUNTRY_CODE;
+
+ state.data.region = urlParams.region || state.data.region;
// Some parameters should get through even if they have falsey
values
state.data.debug = urlParams.debug !== undefined ? true : false;
@@ -180,7 +182,10 @@
* setUpForTestingBanner().
*/
setGeoData: function ( geo ) {
- state.data.country = ( geo && geo.country );
+ if ( geo ) {
+ state.data.country = ( geo.country );
+ state.data.region = ( geo.region );
+ }
},
/**
--
To view, visit https://gerrit.wikimedia.org/r/334410
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb9966614bd4cf219a2d563efdc89f1b8bbd5769
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits