Map an additional user-agent substring to a display label in the dashboard’s Top apps breakdown
The Top apps breakdown in download analytics works by looking for known fragments in what each podcast app calls itself, and grouping the matches under a friendly name. Anything it does not recognise falls into a generic bucket, so a regional or niche app that a podcaster’s audience actually uses can be invisible in their own stats.
benecaster_download_app_patterns lets you add to that table. Order decides the answer: the first fragment that matches wins, so a new pattern has to sit ahead of the broad browser catch-alls or it will never be reached — the generic match will have claimed the download first.
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;
} );
Hooks Used
Need this built rather than just documented? See our services →