Ad

Partial Fetch And Render Due To Blocked Script (Twitter Conversion Tracking)

When I use Fetch and Render tool in Google Webmaster Tools it returns a "partial" (instead of "complete") result because I've added Twitter conversion tracking which points to Twitter's restrictive robots.txt. I've unsuccessfully tried adding rel="nofolow" to Twitter's javascript file and also tried commenting it out with googleon/googleoff tags. Is there a way around this?

Ad

Answer

I figured it out, to only show twitter block if user agent is not a bot by checking it in c# on server side:

var IsRobot = Regex.IsMatch(Request.UserAgent, @"bot|crawler|baiduspider|80legs|ia_archiver|voyager|curl|wget|yahoo! slurp|mediapartners-google", RegexOptions.IgnoreCase);
if(!IsRobot){//Put twitter includes here}
Ad
source: stackoverflow.com
Ad