Add structured data format for SEO?

Hello !

I managed to push “structured data” here with Airtable :

I generated the code with this formula

CONCATENATE(
    '<script type="application/ld+json">',
    '\n{\n  "@context": "https://schema.org",',
    '\n  "@type": "VideoObject",',
    '\n  "name": "', title, '",',
    '\n  "description": "', SUBSTITUTE(video_description, '\n', ' '), '",',
    '\n  "thumbnailUrl": ["', thumbnails_url, '"],',
    '\n  "duration": "PT', LEFT(duration, 2), 'H', MID(duration, 4, 2), 'M', RIGHT(duration, 2), 'S",',
    '\n  "contentUrl": "', url, '",',
    '\n  "uploadDate": "', DATETIME_FORMAT(DATETIME_PARSE(publication_date, 'YYYY_MM_DD'), 'YYYY-MM-DDTHH:mm:ssZZ') , '"',
    '\n}',
    '\n</script>'
)

That renders this with an error:

The generated code is this :

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "VideoObject",
  "name": "Product-Led Growth: De 0 à 1,5M d'ARR en 1 an, carnet de voyage d'un duo PMxPMM",
  "description": "Vous avez peut être vous aussi entendu parlé de Product-led growth ? Après 1 an de transition vers le Product-led Growth, Yousign vient nous raconter les dessous de ce pivot majeur et le rôle clef du duo PMxPMM.",
  "thumbnailUrl": ["https://i.ytimg.com/vi/HX3UjQ1FKz4/hqdefault.jpg"],
  "duration": "PT00H44M56S",
  "contentUrl": "https://www.youtube.com/watch?v=HX3UjQ1FKz4",
  "uploadDate": "2023-12-13T00:00:00+0000"
}
</script>

I tested with Google structured-data tool and it seems to work fine.

So why I got the error ?

Thanks !

I think it’s already telling you why, you probably are supposed to just pass the JSON without the <script> tag, I’m guessing WeWeb adds this automatically, but it works, because WeWeb doesn’t prevent you from not inserting a script within a script. @Alexis you might want to check this out, but it’s not a biggie IMO.

1 Like

That is ! :sweat_smile:

Thanks @Broberto

1 Like

For those who want feedback, i just deleted the script tag

1 Like

I got another pb :

The bind link adds “(Bound)” at the end of my array automaticly :-/

did you manage to fix that one?

Hi Zit, did you manage to add the structured data successfully?
I put json code in a correct format but it is not reflected on the live page at all so Im wondering if its just me having trouble with this