[SmartCrawl Pro] After change from Yoast to SmartCrawl it doesn't take over right meta settin

Hey there dear WPMU DEV Support,
I swaped from Yoast to SmartCrawl, since I like it way more, good job guys! Unfortunately it doesn’t properly take over the meta settings i’m providing it with. Right now I’m trying to get my facebook meta and og settings right. I’m using the Facebook Debugger to test, but sometimes it only shows me the old Yoast data, the OpenGraph image is missing totally. Can you check on that or tell me please, how to debug that?
Thanks a lot! :slight_smile:

  • Adam Czajczyk
    • Support Gorilla

    Hello Tim

    I hope you’re well today!

    I checked the site and I think this is related to CSS or JS included in header. Let me explain :slight_smile:

    I checked the source code of the homepage (that’s “one pager” site, right?) to see if the tags are added there by SmartCrawl and if they are the only ones. I can confirm that they are so that part is fine. FB Debugger didn’t detect image when I tried it, even though using “scrape again” option. Furthermore, it seems it took the title and description from “regular” HTML (“title” and “meta description” tags) rather than OpenGraph meta tags.

    I notice that there’s a lot of CSS “inlined” in the header so I also used “See exactly what our scraper sees for your URL” option in Facebook sharing debugger and it actually stops at some point of that CSS – it doesn’t go any further so it never reaches these tags.

    I admit I’m not sure if that’s because of some limitation (so it only scrapes certain amount of bytes of site’s response) or it that CSS somehow cases their scraper to “break” and abort further scraping. Still though, it seems it simply never gets near the meta tags.

    I think Yoast might be adding them using a lower priority value for the hook that it’s using, which would mean it would be executed earlier which, in turn, may cause tags to be added before the inlined CSS rather than after it – and in such case FB debugger would see them, I believe.

    That being said, I’m not sure how to you “inline” all that CSS there but it’d be great if you could try disabling such option to see if these tags start to get recognized properly then. If you could run such test, let me know about results please.

    Meanwhile, I’ve also asked our developers if there’s any reasonable way to force SmartCrawl to inject these OG meta tags “earlier” than it’s done now so they would go before/above such CSS. Please keep an eye on this ticket and I’ll update you here as soon as I get feedback from them.

    Best regards,
    Adam

  • Tho Bui
    • Staff

    Hi Tim ,

    I hope you’re well today!

    As Adam Czajczyk mentioned, a lot of inline CSS/Script code maybe blocked the FB Debugger. I also will notice with our dev about this case.

    And in that case, I have prepared a custom snippet to priority the OG meta tag, which you can use as a guide here :
    https://gist.github.com/wpmudev-sls/39aa2e8e5b008220ef30d85c327212eb

    You can download a zip, unzip it and upload file smartcrawl-priority-the-og-tags.php to your wp-content/mu-plugins folder. If that folder doesn’t exist you can simply create it.

    After that, can you use Facebook Debugger to test again?

    If you are not familiar with mu-plugins you can read about them here:
    https://wordpress.org/support/article/must-use-plugins/
    or you can paste it in your child theme’s functions.php file.

    Kind regards,
    Tho Bui

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.