• Resolved SN0WKRASH

    (@sn0wkrash)


    Hello,

    Do you include this in is_mobile() – if not, is there a reason not to? If there is a showstopping reason not to, is there a way I can do this myself?

    We’re using this plugin extensively, along with purely responsive code, but Google is ranking our pages lower because the mobile bot does not see the viewport resize with javascript (although all mobile devices do see it), so it thinks we are not optimized for mobile. I’d like to use is_mobile() to resize the viewport, but that won’t help with the Google mobile bot unless it thinks it’s included. Any ideas? Thank you.

    The new Googlebot for smartphones user-agent:
    Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) (updated August 2015)

    https://wordpress.org/plugins/mobble/

Viewing 2 replies - 1 through 2 (of 2 total)
  • You might have to pass this along to the upstream library http://mobiledetect.net/ which Mobble wraps around.

    Plugin Author Scott

    (@scottsweb)

    Mobile detect has bots registered within the code:

    protected static $utilities = array(
            // Experimental. When a mobile device wants to switch to 'Desktop Mode'.
            // http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/
            // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
            // https://developers.facebook.com/docs/sharing/best-practices
            'Bot'         => 'Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom',
            'MobileBot'   => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2',
            'DesktopMode' => 'WPDesktop',
            'TV'          => 'SonyDTV|HbbTV', // experimental
            'WebKit'      => '(webkit)[ /]([\w.]+)',
            // @todo: Include JXD consoles.
            'Console'     => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\b',
            'Watch'       => 'SM-V700',
        );

    Not sure how you would access those. Perhaps something like:

    if ( $mobble_detect->is('MobileBot') ) { ...
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Include new Googlebot for smartphones user-agent in is_mobile() ?’ is closed to new replies.