I am going to be putting some products structured data onto my site, however I cannot access the HTML of an individual page due to the CMS I am using.

So my question is this; Where can I place this product structured data on my page without adding it into the back-end HTML or the head of a page?

The only other option would be to add it into the site-wide product page HTML so that it appears on every page, however this wouldn't work very well as every page has different products with different prices etc.

Does anyone have any solutions or had a similar problem before?

  • Can you add HTML as page content? If yes, any HTML or is it restricted (e.g., only whitelisted elements)?
    – unor
    Aug 26, 2016 at 15:07
  • 1
    It seems to work for all HTML. I can add it anywhere, its just whether it is going to be picked up or not which is the problem.
    – Jvital
    Aug 26, 2016 at 15:36

3 Answers 3


As you can add HTML as content, you can provide structured data.

It would be possible with all three supported syntaxes (JSON-LD, Microdata, RDFa), but when you can’t mark up your existing HTML elements, using Microdata/RDFa doesn’t really make sense (you would have to add hidden/empty elements). So JSON-LD seems to be the best option here.

You don’t have to add the script element to the head, you can add it to the body, too.



  <script type="application/ld+json"></script>


  • So would I need to find the Json-LD rich snippet HTML or would it be the same code, just placed somewhere differently? Or would it simply be as simple as using the piece of code above, but just adding the rich snippet code inside there?
    – Jvital
    Aug 30, 2016 at 9:10
  • @Jvital: I’m not sure what you mean with "Json-LD rich snippet HTML". -- If you have a script element with type application/ld+json, it may only contain JSON-LD. For the JSON-LD it doesn’t matter where in the document it is specified.
    – unor
    Aug 30, 2016 at 9:13

I find not being in control of the HTML of your own site due to its CMS entirely bizarre. Get a different CMS. Even better, tell us what this CMS is so we can all avoid it like the plague.

Look into JSON-LD though I'm still not sure this solves the problem cause you need to inject it as a script element in the head.

  • Trust me we are going to vacate as soon as possible, problem after problem is arising especially when it comes to the SEO side of things with cannibalization and a whole list of problems developing as we try to optimise. It looks as if with JSON-LD you need to have access to the head of a page, leaving me in the same position unfortunately. Would placing it in the body of the page not work then?
    – Jvital
    Aug 26, 2016 at 13:39
  • @Jvital <script> would be invalid outside the head element.
    – Rob
    Aug 26, 2016 at 14:34
  • Would using the data highlighter work as an alternative to structured data? Does Google still show it the same and deem it the same priority?
    – Jvital
    Aug 26, 2016 at 15:38

If you're able to add Tag Manager to the site-wide template and each product's info has identical xpaths/IDs/classes, you can push this data to the datalayer by capturing the values with a JavaScript.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.