Map an additional user-agent substring to a display label in the dashboard’s Top apps breakdown
benecaster_download_app_patterns controls the substring-to-label table used to bucket user-agent strings on GET /shows/{id}/analytics and GET /episodes/{id}/analytics. Keys are lowercased substrings (first match wins); values are the display label. Prepend your own pattern ahead of the broader defaults (e.g. ahead of the generic mozilla/chrome Browser fallback) to take priority.
Code
<?php
add_filter( 'benecaster_download_app_patterns', function ( array $patterns ): array {
// Prepend a custom bucket so it wins ahead of the generic browser fallback.
return [ 'mycorpbot' => 'My Corp Bot' ] + $patterns;
} );