2

Using Sitecore 9 and SXA 1.7

We are trying to use Opengraph meta tags by adding custom metadata in this section for an item enter image description here however, it never renders on the page,and never shows up in the html.

We checked that our page's page design includes meta data partial design.

is there something we are doing wrong?

2 Answers 2

4

You are editing wrong section (Custom Metadata - for custom tags).

key value collection will be rendered in a following way:

<meta name="test_key" content="test">

There is OpenGraph section and you should use it instead.

enter image description here

Also make sure that you have appropriate renderings on the meta partial design (Open Graph rendering).

enter image description here

1
  • We had tried using the open graph section but it didn't work, turns out in the end it was because of the facebook script in the default social media group, it was always overwriting our open graph scripts with theirs,once we changed the default group to "unpublishable" it worked! thanks anyway :) Commented Oct 17, 2018 at 15:32
0

After using the Open graph section mentioned by Alan, we found that it still didn't work, the info we were inputting still didn't get rendered in the page at all. Turns out it's because of the Facebook SDK script included in the Default social media group's "Common Code Snippet" at the path : /sitecore/content/Tenant/Home/Settings/Social Media Groups/Default.

enter image description here

We finally solved the issue by making the default item and its children unpublishable, and I believe this can also be solved by removing the common code snippet if it's of no use to you.

Once we made it unpublishable, any info we inputted in the "Open graph" section of an item would appear just fine.

1
  • I have done the above steps but still, I'm unable to see the data. Please suggest any other way? I'm using Sitecore 902 and SXA 1.8 versions Commented Jul 8, 2019 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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