Jump to content

Company Logo for Google Search Result


Ben90

Recommended Posts

Hi guys,

 

Do you know how to make a company logo appears on Google Search Result?

 

Based on Google Developers page, the schema code is like this:

 

https://developers.google.com/structured-data/customize/logos

<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "Organization",
      "url": "http://www.example.com",
      "logo": "http://www.example.com/images/logo.png"
    }
    </script>

I put this code on the header. But, if I check on Developer Tools on Chrome, there is an error notif:

Uncaught SyntaxError: Unexpected token :

 

Anybody knows how to fix it in prestashop 1.6 ? I believe this thing is one of the powerful tools in SEO as it's impacting the looks in Google Search Result.  :)

Link to comment
Share on other sites

  • 2 weeks later...

Nobody use it? It would be awesome if you have this for your company website.

 

This is the example result of Sony Australia

 

9uyfxd.jpg

 

Another awesome thing is Google Sitelink search as you can see up there. Well, it's OOT but it would be great if someone has any idea about that  :)

Link to comment
Share on other sites

  • 1 month later...

Hi,

Do you solve it ?

 

I had this in header.tpl :

{if $page_name == 'index'}
		
			<script type="application/ld+json">
			{
			"@context": "http://schema.org",
			"@type": "Organization",
			"url": "http://www.millesime-online.com",
			"logo": "http://www.millesime-online.com/img/millesime-online-1413448802.jpg"
			}
			</script>
		
		{/if}

but i have the error :

 

SyntaxError: missing ; before statement

 

/* <![CDATA[ */;{"@context":"http://schema.org","@type":"Organization","url":"ht...

 

:(

Link to comment
Share on other sites

Try it with literal tags

{literal}
<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "Organization",
      "url": "http://www.example.com",
      "logo": "http://www.example.com/images/logo.png"
    }
</script>
{/literal}

However, I believe this is the best way

<div itemscope itemtype="http://schema.org/Organization">
  <a itemprop="url" href="http://www.example.com/">Home</a>
  <img itemprop="logo" src="http://www.example.com/logo.png" />
</div>  
Edited by ventura (see edit history)
Link to comment
Share on other sites

hi ventura,

 

It only work by this way :

{if $page_name == 'index'}
			
			<div style="display:none" itemscope itemtype="http://schema.org/Organization">
				<a itemprop="url" href="http://www.millesime-online.com"></a>
				<img itemprop="logo" src="http://www.millesime-online.com/img/millesime-online-1413448802.jpg" />
			</div> 
		
		{/if}

Thank you very much.

 

but it's impossible to add the ld-json version ?

Link to comment
Share on other sites

try again adding the red color code, without page statement.

This for default-theme

 

<div itemscope itemtype="http://schema.org/Organization id="header_logo">

<a itemprop="url" href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{$shop_name|escape:'html':'UTF-8'}">

<img itemprop="logo" class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if isset($logo_image_width) && $logo_image_width} width="{$logo_image_width}"{/if}{if isset($logo_image_height) && $logo_image_height} height="{$logo_image_height}"{/if}/>

</a>

</div>

Link to comment
Share on other sites

Thank you very much. But now i have this structure data in all the pages and not only in index, it's not a mistake for google ?

 

So which code at the end you're using that works?

 

Did you check SERP and find your company logo right there?

Link to comment
Share on other sites

guil, if you want that code only on homepage you can do this.

<div {if $page_name == 'index'}itemscope itemtype="http://schema.org/Organization"{/if} id="header_logo" >
<a {if $page_name == 'index'}itemprop="url" {/if}href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{$shop_name|escape:'html':'UTF-8'}">
<img {if $page_name == 'index'}itemprop="logo" {/if}class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"/>
</a>
</div>
Edited by MerseyRay (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

 

guil, if you want that code only on homepage you can do this.

<div {if $page_name == 'index'}itemscope itemtype="http://schema.org/Organization"{/if} id="header_logo" >
<a {if $page_name == 'index'}itemprop="url" {/if}href="{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}" title="{$shop_name|escape:'html':'UTF-8'}">
<img {if $page_name == 'index'}itemprop="logo" {/if}class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"/>
</a>
</div>

 

Hi Mersey,

 

Using DIV for Google schema markup in Prestashop is working, but the blank space with company logo at the very top of the website will appear & it looks very ugly.

 

Meanwhile, using JSON in order to hide the logo for the same function is not working. It shows an error like what I posted in the 1st place.

Link to comment
Share on other sites

Do you have a site we can see so we know what you are talking about ?

 

Hi, yes I can show you the actual error message on the site. The only thing is when I keep that error with this code on the site:

{literal}
<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "Organization",
      "url": "http://www.example.com",
      "logo": "http://www.example.com/images/logo.png"
    }
</script>
{/literal}

It conflicted with Google Analytics, so I can't keep it for too long.

Link to comment
Share on other sites

hi,

 

I found :)

 

in footer.tpl, after

{include file="$tpl_dir./global.tpl"} 

:

 

add :

{if $page_name == 'index'}
<script type="application/ld+json">
{literal}
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "name": "exemple",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "exemple1",
    "postalCode": "33520",
    "addressLocality": "Bruges, France"
  },
  "email": "[email protected]",
  "telephone": "+33 05 12 12 12 12",
  "url" : "{/literal}{$base_dir_ssl}{literal}",
  "logo" : "{/literal}{$logo_url}{literal}"
}
{/literal}
</script>

{/if}
Link to comment
Share on other sites

 

hi,

 

I found :)

 

in footer.tpl, after

{include file="$tpl_dir./global.tpl"} 

:

 

add :

{if $page_name == 'index'}
<script type="application/ld+json">
{literal}
{
  "@context": "http://schema.org",
  "@type": "Organization",
  "name": "exemple",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "exemple1",
    "postalCode": "33520",
    "addressLocality": "Bruges, France"
  },
  "email": "[email protected]",
  "telephone": "+33 05 12 12 12 12",
  "url" : "{/literal}{$base_dir_ssl}{literal}",
  "logo" : "{/literal}{$logo_url}{literal}"
}
{/literal}
</script>

{/if}

 

Hi, I reckon that one is not for Company Logo, but that one is for company profile. As far as I know, it has been replaced by Google My Business or at least it got the same function or maybe better.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...