Forum

normal Google search rankings

More
1 year 8 months ago #228 by frank
Google search rankings was created by frank
Awesome plug-in and works great except!
When Google does mobile search ranking, it did not pick up properly on the mobile version of the site. Google did see there was a mobile version, but the site was tested as if the desktop template was active. URL is www.immigrantwelcome.ca/ Yes the template switch does work if I test the site on a mobile phone, but if I use Google Chrome development environment, it only switches to the mobile version if I pick a specific device.

Hopefully I explained this clearly, and the only reason I bring it up because Google is reducing the site's mobile ranking.
I have attached a screen shot form google webmaster.

Thank You!
Attachments:

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #229 by Gregorio
Replied by Gregorio on topic Google search rankings
Hello frank, and thanks for the compliment.

I understand what you are talking about but: this plugin uses the PHP library "Mobile Detect" ( mobiledetect.net/ ) to detect when the browsing device is mobile or not.
So if you try to browse the website with a desktop browser, resized like a smartphone, the shown template will be still the desktop template, because "Mobile Detect" doesn't detect the screen sizes but the device.

The only way I have in mind to solve that is to check if Google scrapes mobile pages with a "different simulated device" than the desktop one. If so, the plugin could be modified to let Google to see the mobile template. Otherwhise, if Google scans mobile sites with the "same virtual device" isn't possible to let this plugin to switch the template for Google.

I think that some informations regarding Google's user agents can be found here: support.google.com/webmasters/answer/1061943?hl=en

I've fastly looked in my source code. I think you can try to put this code at row 88 replacing the existing in file "digi_template_switch.php":
if ( $detect->isMobile() || $detect->isTablet() || $detect->is('MobileBot') )

I haven't found a big documentation about detecting bots with "Mobile Detect" library.
If the code above doesn't work, the problem (maybe) can be solved by detecting the user agent.
The only problem is the time to do that. At the moment we are full of work.
If you are able, you can try yourself by these solutions (and maybe share here for other users), otherwise I will do it in the future releases of this plugin, but I can't say when exactly.

Please let me know ;)
Thanks for using our plugin and to be interested in improving it.

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #231 by frank
Replied by frank on topic Google search rankings
I changed line 88 to the following and it seems to work.
Will test some more in a few days.
if(($detect->isMobile())||($detect->isTablet())||($detect->is('mobile-googlebot')))

Only problem is if it is only using googlebot, then in search results may only pickup mobile content even on desktop.

Thank You for your help,

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #232 by Gregorio
Replied by Gregorio on topic Google search rankings
Hi,
may you can change the same line 88 as:
if(($detect->isMobile())||($detect->isTablet())||($detect->is('mobile-googlebot') && $detect->isMobile()))

In this way we tell to the mobile library with the last option that if is Google-Bot and is Mobile, then switch the template.

I hope it can be you solution. Please write here the result after you have tried.

Thanks

Please Log in or Create an account to join the conversation.

Subscribe to our newsletter

  • Language:
  • Email: This email address is being protected from spambots. You need JavaScript enabled to view it.

This site uses cookies to improve navigation and services offered to the visitor. Cookies and their use, managed according to GDPR regulation, are automatically accepted if you choose to continue browsing this website.