File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -222,26 +222,19 @@ public static function get_source( $source_type ) {
222222 /**
223223 * Get random device type based on the following distribution:
224224 * Mobile: 50%
225- * Desktop: 30%
226- * Tablet: 10%
227- * Unknown: 10%
225+ * Desktop: 35%
226+ * Tablet: 15%
228227 */
229228 public static function get_random_device_type () {
230229 $ randomNumber = wp_rand ( 1 , 100 ); // Generate a random number between 1 and 100.
231230
232231 if ( $ randomNumber <= 50 ) {
233232 return 'Mobile ' ;
234- }
235-
236- if ( $ randomNumber <= 80 ) {
233+ } elseif ( $ randomNumber <= 85 ) {
237234 return 'Desktop ' ;
238- }
239-
240- if ( $ randomNumber <= 90 ) {
235+ } else {
241236 return 'Tablet ' ;
242237 }
243-
244- return 'Unknown ' ;
245238 }
246239
247240 /**
You can’t perform that action at this time.
0 commit comments