An Important Update

Dear Followers Of This Blog ...

If you did not use a Blogger / Google account when you Followed this blog, years ago, you are probably not Following now . During the past...

Saturday, February 20, 2016

Using The Meta Search Description In Your Blog

There is some confusion, about including "search description" meta content, in blog template code, to provide source for data shares to social sharing sites.

In various topics in Blogger Help Forum: Get Help with an Issue, I've seen references to "data:post.metaDescription", "data:post.snippet", and "data:post.pageTitle" used, in providing the blog post source for the FaceBook "og:description" tag. As far as I can tell, none of these exist.

The Layout data tag "data:blog.metaDescription", which provides "og:description", does exist - though it seems to be referenced, ambiguously.

Some FaceBook Open Graph content references different Blogger tags, depending upon page type. The FaceBook "og:title" references "data:blog.pageName" with an "item" (post) page, and "data:blog.title"; with other pages.

"og:description", on the other hand, only references one Blogger tag - "data:blog.metaDescription". The latter appears to change its source, depending upon whether the main page, or a post page, is being viewed.

  • In main page mode, the per blog "Description", from Settings - Search preferences, is referenced.
  • In post page mode, the per post "Search Description", from the Post Editor "Post settings", is referenced.


Source listing for this blog, in main page view.

"What Blogger won't (or can't) tell you. Blogger features and problems explained, using real life examples."




Source listing for this post, in post page view.

"Blogger provides the meta tag "data:blog.metaDescription", which seems to vary in source. Learn how it varies."



There is no mention of "data:blog.metaDescription", in the reference Blogger Help: Layouts Data Tags - as either a per blog, or per post, data element.

In my earlier post, my reference to "'data:blog.metaDescription' name='description'" was simple. But simplicity can lead to confusion.

<meta expr:content='data:blog.metaDescription' name='description' property='og:description'/>

Some tags are universal, others vary depending upon page type ("item" being post page).

<!-- BEGIN Open Graph tags -->
<meta expr:content='data:blog.metaDescription' name='description'' property='og:description'/>
<meta expr:content='data:blog.pageTitle' name='keywords'/>
<b:if cond='data:blog.pageType == "item"'>
<meta content='article' property='og:type'/>
<meta content='https://plus.google.com/nnnnnnnnnnnnnnnnnnnnn/about' property='article:author'/>
<meta expr:content='data:blog.canonicalUrl' property='og:url'/>
<meta expr:content='data:blog.pageName' property='og:title'/>
<b:if cond='data:blog.postImageUrl'>
<meta expr:content='data:blog.postImageUrl' property='og:image'/>
<b:else/>
<meta content='http://xxxxxxxxxxxxxxxxx/xxxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxx/S1600-R/yyyyyyyyyyyyy.gif' property='og:image'/>
</b:if>
<b:else/>
<meta expr:content='data:blog.title' property='og:title'/>
<meta expr:content='data:blog.canonicalHomepageUrl' property='og:url'/>
<meta content='blog' property='og:type'/>
<meta content='http://xxxxxxxxxxxxxxxxx/xxxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxx/S1600-R/yyyyyyyyyyyyy.gif' property='og:image'/>
</b:if>
<meta expr:content='"en_US"' property='og:locale'/>
<!-- END Open Graph tags -->

'data:blog.metaDescription' name='description' is referenced once, in the template code - and the source is apparently determined, based on the context.

If you find this confusing, I have to agree with you.

---

#Blogger provides the Layout data tag "data:blog.metaDescription", which is used for the FaceBook meta ag "og:description" - for both blog main page, and post pages, when shared. This is in contrast to the FaceBook meta tag "og:title" and others, which use different Blogger data tags for the main page and post pages.

This variation has caused some confusion - and attempted use of different non existent Blogger data tags.

Dude, hit me with a comment!

Pavel Chistyakov said...

Why you can't use some other Blogger tags?

<meta content='data:blog.googleProfileUrl + "/about"' property='article:author'/>
<meta content='data:blog.postImageUrl' property='og:image'/>
<meta expr:content='data:blog.locale' property='og:locale'/>

Chuck Croll said...

Pavel,

Thanks for asking the question.

I suppose that you can use any tags that please you. This post is about the "description" tags, in FaceBook shares.

I wrote an earlier post, Adding Author Identification, To Post On FaceBook, where I explored a full complement of tags.

http://blogging.nitecruzr.net/2013/12/adding-author-identification-on-facebook.html