SEO field preview doesn't show local fallbacks

This might be more of a feature request:

I’ve noticed that the SEO field previews (for Google, Facebook, Twitter) will show the Global SEO Settings when left blank.

However, the actual SEO results for the page may pick up local Title and Image values. (I haven’t been able to make them pick up a local Description, but that’s a different topic).

So, the preview in the SEO field pane becomes inaccurate, for records purposefully relying on derived local fallback values.

Is this something that’s on the radar/roadmap already? I haven’t been able to find specific mentions.

Hi @alex.burner!

There is no way for DatoCMS backend to know which SEO values you will ultimately use in your code so the preview shows how your search-box will look like on Google Twitter etc. if you use exactly the values in that single SEO field, which is the result on the single record SEO settings and the global SEO fallback values.

I am not sure if I am getting your request right, would you prefer to have no preview at all?

Hello @Souljuse! In this case, I’m assuming most people are using DatoCMS’s _seoMetaTags method, as advised by the docs:

Meta tags are generated merging the values present in the record’s SEO meta tags field together with the Global SEO settings you can configure under Content > Settings

If the record doesn’t have a SEO meta tags field, the method tries to guess reasonable values by inspecting the other fields of the record (single-line strings and images).

For this request, I’m hoping the SEO preview could show the result of the _seoMetaTags query on the resource in question.

Thinking about this more, we actually would prefer no preview, at least as a short-term fix. Perhaps an option to turn it off in the SEO meta tags field, under Presentation settings?

As it stands, the site we’re building consistently uses _seoMetaTags and the corresponding renderMetaTags() React helper ( — so we’ll have to warn the client to ignore the preview pane, unless they’re setting explicit local SEO values on a record.

But our long term ideal would be the preview pane accurately reflecting _seoMetaTags

@alex.burner just to check if I’ve understood correctly, you are suggesting to show the fallback title/image in the preview if the SEO field is empty, rather than showing the global fallback, right?

That looks good to me. I agree that’s what I would expect as well. I’ll open a task internally

Yep @mat_jack1 that’s exactly right. Thanks for opening an internal task!

@alex.burner this was actually a regression, thanks for reporting. The title field was actually working, but not the image field! This has been fixed now!

Excellent, I see it working now! Thanks all for being so responsive.

FWIW this is personally my first time using DatoCMS, and I’ve been thoroughly impressed so far. We built this whole client site much faster than expected: every feature we were hoping for was present, we could model everything we wanted (minus a “repeatable” for fields - but Links + separate Models gave us everything we needed there), and the editing experience is amazing (infinite nesting “create new record” modals, with full save/publish experience on each layer, so nice).

We just bumped up to a paid account and are unleashing content editors into the CMS next week.

1 Like

thank you very much for the nice feedback!! :slight_smile:

1 Like