File tree 3 files changed +26
-1
lines changed
3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -1070,6 +1070,9 @@ function getFloorsConfiguration(prebidConfig){
1070
1070
auctionDelay : CONFIG . getFloorAuctionDelay ( ) ,
1071
1071
endpoint :{
1072
1072
url : CONFIG . getFloorJsonUrl ( )
1073
+ } ,
1074
+ additionalSchemaFields : {
1075
+ browser : util . getBrowser
1073
1076
}
1074
1077
}
1075
1078
}
Original file line number Diff line number Diff line change @@ -1935,3 +1935,22 @@ exports.applyCustomParamValuesfApplicable = function(params) {
1935
1935
}
1936
1936
}
1937
1937
}
1938
+
1939
+ exports . getBrowser = function ( ) {
1940
+ var userAgent = navigator . userAgent ;
1941
+ var browserName ;
1942
+ if ( userAgent . match ( / c h r o m e | c h r o m i u m | c r i o s / i) ) {
1943
+ browserName = "chrome" ;
1944
+ } else if ( userAgent . match ( / f i r e f o x | f x i o s / i) ) {
1945
+ browserName = "firefox" ;
1946
+ } else if ( userAgent . match ( / s a f a r i / i) ) {
1947
+ browserName = "safari" ;
1948
+ } else if ( userAgent . match ( / o p r \/ / i) ) {
1949
+ browserName = "opera" ;
1950
+ } else if ( userAgent . match ( / e d g / i) ) {
1951
+ browserName = "edge" ;
1952
+ } else {
1953
+ browserName = "No browser detection" ;
1954
+ }
1955
+ return browserName ;
1956
+ }
Original file line number Diff line number Diff line change @@ -950,7 +950,10 @@ describe('ADAPTER: Prebid', function() {
950
950
auctionDelay : 100 ,
951
951
endpoint :{
952
952
url : "externalFloor.json"
953
- }
953
+ } ,
954
+ additionalSchemaFields : {
955
+ browser : UTIL . getBrowser
956
+ }
954
957
}
955
958
function onSSOLogin ( ) { } ;
956
959
window . owpbjs = {
You can’t perform that action at this time.
0 commit comments