Highlighted

Using JSON-LD For Structured Data

Rookie Contributor

I would like to dynamically inject JSON-LD specifications on my pages for rich snippets SERPs. This is a new way available to generate rich snippets to annotate social graphs and enable sitelinks searchbox, etc in Google.

I know there is a way to flatten json objects in Tealium, but would the flatten json object still be picked up by Google to generate rich snippets?

One of the schemas would look something like this:



I've run a few tests but Tealium is returning errors when I try to add this type of code.

I've had a look at this article, but wasn't able to solve it:
Flatten JSON Objects Extension

Can someone let me know if this is possible and if so, how to run this?

8 REPLIES 8
Highlighted

Using JSON-LD For Structured Data

Tealium Employee

Martijn, It looks like the CSS engine on the community already went home for the week and forgot to format your post ;-) I've never seen this happen before, and we'll look into it. In the meantime, I've copied the contents of the question here for everybody's benefit. Original Question: I've run a few tests but Tealium is returning errors when I try to add this type of code I've had a look at this article, but wasn't able to solve it: Flatten JSON Objects Extension Can someone let me know if this is possible and if so, how to run this?

Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Highlighted

Using JSON-LD For Structured Data

Rookie Contributor
I like to break stuff for you to build back up again :)
Highlighted

Using JSON-LD For Structured Data

Tealium Employee
Hi Martijn, Can you drop an email to support-emea@tealium.com with the error message that you receive and I'll take a look (I'll then come back here and update for all to see :-) )
Highlighted

Using JSON-LD For Structured Data

Tealium Employee
Hi Martijn, I know I responded via the support case, however for completeness - the error message that you saw sometimes is caused by switching environments in WebCompanion while using bundled tags. It's not actually related to the JSON flattening at all. If you use Charles Proxy to switch environments instead, you should see the error message disappears. I hope that resolved the issue for you. Many thanks Steve
Highlighted

Using JSON-LD For Structured Data

Silver Contributor
Silver Contributor
Hi Martijn, Can I ask how did you add this code finally to Tealium? Through a simple JS code extension? With flattening? Or custom container? How do you manager the different data for the different sites?
Highlighted

Using JSON-LD For Structured Data

Tealium Employee
Hi Tibor, JSON-LD is a markup format, generally used for search engine optimization purposes (essentially, it's just metadata). As such, it's not really suitable for integration into Tealium, because even if we inject the JSON-LD snippet into the page, it's unlikely that search engines will be able to see the data and make use of it. Ideally, you need to integrate the JSON-LD object directly in your CMS. Can I ask what this is related to? Is it for a tag, or some other purpose? Hope this helps. Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Highlighted

Using JSON-LD For Structured Data

Silver Contributor
Silver Contributor
Hi Craig, We thought we could do it in Tealium because we read we could do it Google Tag Manager: http://www.swellpath.com/2015/03/7-steps-to-pushing-json-structured-data-using-google-tag-manager/ We use several CMS systems and we thought we wouldn't add this functionality to each CMS but use Tealium because it is already on all of our pages. Regards Tibor
Highlighted

Using JSON-LD For Structured Data

Rookie Contributor

Hey @tibor_szentmarj,

I am trying to do some structured data mockup similar to what you've asked previously through Tealium. How did you go with yours? Do you mind sharing how you achieved it?

Cheers,
Allen