web hosting
build a website

Magento change head content in specific page including OG: tags

Aug 16, 2015   //   by Anthony Devine   //   Website Development tips  //  No Comments

To change content in a Magento page. Open up the page and on the left hand side click Design and then in the Layout Update XML you can add in the following reference code:

<reference name="head">
  <block type="core/text" name="foo">
    <action method="setText">
<meta property="og:title" content="CONTENT" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://SITE.COM/IMAGE_URL.jpg" />
<meta property="og:url" content="http://SITE.COM" />
<meta property="og:site_name" content="SITE_NAME" />
<meta property="og:description" content="SITE CONTENT" /> 

inside the

 <value> </value> 
tags you can add any code you wish and it will add it into the head of your site. This makes it a lot easier if you wish to just add tracking code to one of your pages onto your Magento site.